OpenStudio:utilities
Loading...
Searching...
No Matches
openstudio::Transformation Class Reference

#include <Transformation.hpp>

Public Member Functions

EulerAngles eulerAngles () const
 get the Euler angles for the transformation, does not include translation
 
Transformation inverse () const
 returns a transformation which is the inverse of this
 
Matrix matrix () const
 get the matrix representation directly
 
BoundingBox operator* (const BoundingBox &boundingBox) const
 apply the transformation to the bounding box
 
Plane operator* (const Plane &plane) const
 apply the transformation to the plane
 
Point3d operator* (const Point3d &point) const
 apply the transformation to the point
 
std::vector< Point3doperator* (const std::vector< Point3d > &points) const
 apply the transformation to a vector of points
 
std::vector< Vector3doperator* (const std::vector< Vector3d > &vectors) const
 apply the transformation to a vector of vector
 
Transformation operator* (const Transformation &other) const
 apply the transformation to the other transformation
 
Vector3d operator* (const Vector3d &vector) const
 apply the transformation to the vector
 
Transformationoperator= (const Transformation &)=default
 
Transformationoperator= (Transformation &&) noexcept=default
 
Matrix rotationMatrix () const
 get the rotation matrix for the transformation, does not include translation
 
 Transformation ()
 default constructor creates identity transformation
 
 Transformation (const Matrix &matrix)
 constructor from storage, asserts matrix is 4x4
 
 Transformation (const Transformation &other)=default
 
 Transformation (const Vector &vector)
 constructor from storage, asserts vector is size 16
 
 Transformation (Transformation &&other) noexcept=default
 
Vector3d translation () const
 get the translation for the transformation, does not include rotation
 
Vector vector () const
 get the vector representation directly
 

Static Public Member Functions

static Transformation alignFace (const std::vector< Point3d > &vertices)
 transforms face coordinates to regular system, face normal will be z' will try to align y' with z, but if that fails will align y' with y face origin will be minimum point in x', y' and z'=0 will return identity transformation if cannot compute plane for vertices
 
static Transformation alignZPrime (const Vector3d &zPrime)
 transforms system with z' to regular system will try to align y' with z, but if that fails will align y' with y
 
static Transformation rotation (const EulerAngles &angles)
 rotation specified by Euler angles
 
static Transformation rotation (const Point3d &origin, const Vector3d &axis, double radians)
 rotation about point defined by axis and angle (radians)
 
static Transformation rotation (const Vector3d &axis, double radians)
 rotation about origin defined by axis and angle (radians)
 
static Transformation translation (const Vector3d &translation)
 translation along vector
 

Constructor & Destructor Documentation

◆ Transformation() [1/5]

openstudio::Transformation::Transformation ( )

default constructor creates identity transformation

◆ Transformation() [2/5]

openstudio::Transformation::Transformation ( const Matrix & matrix)

constructor from storage, asserts matrix is 4x4

◆ Transformation() [3/5]

openstudio::Transformation::Transformation ( const Vector & vector)

constructor from storage, asserts vector is size 16

◆ Transformation() [4/5]

openstudio::Transformation::Transformation ( const Transformation & other)
default

◆ Transformation() [5/5]

openstudio::Transformation::Transformation ( Transformation && other)
defaultnoexcept

Member Function Documentation

◆ alignFace()

static Transformation openstudio::Transformation::alignFace ( const std::vector< Point3d > & vertices)
static

transforms face coordinates to regular system, face normal will be z' will try to align y' with z, but if that fails will align y' with y face origin will be minimum point in x', y' and z'=0 will return identity transformation if cannot compute plane for vertices

◆ alignZPrime()

static Transformation openstudio::Transformation::alignZPrime ( const Vector3d & zPrime)
static

transforms system with z' to regular system will try to align y' with z, but if that fails will align y' with y

◆ eulerAngles()

EulerAngles openstudio::Transformation::eulerAngles ( ) const

get the Euler angles for the transformation, does not include translation

◆ inverse()

Transformation openstudio::Transformation::inverse ( ) const

returns a transformation which is the inverse of this

◆ matrix()

Matrix openstudio::Transformation::matrix ( ) const

get the matrix representation directly

◆ operator*() [1/7]

BoundingBox openstudio::Transformation::operator* ( const BoundingBox & boundingBox) const

apply the transformation to the bounding box

◆ operator*() [2/7]

Plane openstudio::Transformation::operator* ( const Plane & plane) const

apply the transformation to the plane

◆ operator*() [3/7]

Point3d openstudio::Transformation::operator* ( const Point3d & point) const

apply the transformation to the point

◆ operator*() [4/7]

std::vector< Point3d > openstudio::Transformation::operator* ( const std::vector< Point3d > & points) const

apply the transformation to a vector of points

◆ operator*() [5/7]

std::vector< Vector3d > openstudio::Transformation::operator* ( const std::vector< Vector3d > & vectors) const

apply the transformation to a vector of vector

◆ operator*() [6/7]

Transformation openstudio::Transformation::operator* ( const Transformation & other) const

apply the transformation to the other transformation

◆ operator*() [7/7]

Vector3d openstudio::Transformation::operator* ( const Vector3d & vector) const

apply the transformation to the vector

◆ operator=() [1/2]

Transformation & openstudio::Transformation::operator= ( const Transformation & )
default

◆ operator=() [2/2]

Transformation & openstudio::Transformation::operator= ( Transformation && )
defaultnoexcept

◆ rotation() [1/3]

static Transformation openstudio::Transformation::rotation ( const EulerAngles & angles)
static

rotation specified by Euler angles

◆ rotation() [2/3]

static Transformation openstudio::Transformation::rotation ( const Point3d & origin,
const Vector3d & axis,
double radians )
static

rotation about point defined by axis and angle (radians)

◆ rotation() [3/3]

static Transformation openstudio::Transformation::rotation ( const Vector3d & axis,
double radians )
static

rotation about origin defined by axis and angle (radians)

◆ rotationMatrix()

Matrix openstudio::Transformation::rotationMatrix ( ) const

get the rotation matrix for the transformation, does not include translation

◆ translation() [1/2]

Vector3d openstudio::Transformation::translation ( ) const

get the translation for the transformation, does not include rotation

◆ translation() [2/2]

static Transformation openstudio::Transformation::translation ( const Vector3d & translation)
static

translation along vector

◆ vector()

Vector openstudio::Transformation::vector ( ) const

get the vector representation directly