Skip to content

Class Field

ClassList > Field

  • #include <Field.h>

Inherits the following classes: Transform3D

Public Types inherited from Transform

See Transform

Type Name
enum TransType
Flags for enabling/disabling transform components.

Public Attributes

Type Name
FieldType fld_type = NONE\_FIELD

Public Attributes inherited from Transform3D

See Transform3D

Type Name
glm::mat4 o_InvTransform = { 1.0f }
Cached inverse world transform matrix.
glm::mat4 o_Transform = { 1.0f }
Cached world transform matrix.
glm::vec3 o_dir_right = { 1.0f, 0.0f, 0.0f }
Right direction vector (X+)
glm::vec3 o_dir_up = { 0.0f, 1.0f, 0.0f }
Up direction vector (Y+)
glm::vec3 o_position = { 0.0f }
World position.
glm::vec3 o_rot = { 0.0f }
Euler rotation angles (radians): pitch, yaw, roll.
glm::vec3 o_scale = { 1.0f }
Local scale (non-uniform allowed)

Public Attributes inherited from Transform

See Transform

Type Name
bool is_TransF_changed = true
Transform matrix needs recomputation.
bool is_Uniform_changed = true
Uniform (non-scaled) transform needs recomputation.
bool is_invTransF_changed = true
Inverse transform needs recomputation.
bool is_invUniform_changed = true
Inverse uniform transform needs recomputation.
bool use_position = { true }
Enable position component in transform computation.
bool use_rotation = { true }
Enable rotation component in transform computation.
bool use_scale = { true }
Enable scale component in transform computation.

Public Functions inherited from Transform3D

See Transform3D

Type Name
virtual bool ApplyAllTransform () override
Recomputes transform and all parent transforms.
virtual bool ApplyTransform (bool _forced=false) override
Recomputes transform matrix if dirty.
Transform3D * GetChildTransPtr ()
Returns pointer to first child transform.
virtual bool GetInvTransform () override const
Computes inverse transform matrix.
Transform3D * GetParentTransPtr ()
Returns pointer to parent transform.
Transform3D * GetTransformPtr ()
Returns pointer to this transform.
void LookAt (const glm::vec3 & tar, const glm::vec3 & up={0, 0, 1})
Orients transform to look at target position.
void Move (const glm::vec3 & d_pos)
Translates position by offset.
void SetParent (Transform3D * _p_trans, bool _keep_offset=true)
Sets parent transform for hierarchy.
bool SetPos (const glm::vec3 & pos)
Sets world position.
bool SetPos1D (float _1d, GLuint _dim)
Sets single axis of position.
bool SetRot (const glm::vec3 & rot)
Sets rotation via Euler angles.
bool SetRot1D (float _1d, GLuint _dim)
Sets single axis of rotation.
bool SetScale (const glm::vec3 & scale)
Sets local scale.
bool SetScale1D (float _1d, GLuint _dim)
Sets single axis of scale.
bool SetTrans (const glm::mat4 & _trans, bool pos=true, bool rot=true, bool scl=true)
Sets transform from 4x4 matrix.
void Spin (const glm::vec3 & anch, const glm::vec3 & axis, const float & angle)
Rotates around arbitrary axis through anchor point.
void Spin (const glm::vec3 & anch, const glm::vec2 & angle, bool global_up=true)
Rotates around anchor with pitch/yaw.
void Trans (const glm::mat4 & _trans)
Applies transformation matrix to current transform.
Transform3D ()
Constructs a Transform3D with identity values.
virtual void UnsetParent (bool _keep_offset=true) override
Removes parent transform relationship.
virtual int _debug () override const
Debug utility for transform state inspection.
~Transform3D ()
Destroys the Transform3D .

Public Functions inherited from Transform

See Transform

Type Name
virtual bool ApplyAllTransform () = 0
Recomputes transform and all parent transforms.
virtual bool ApplyTransform (bool _forced=false) = 0
Recomputes transform matrix if dirty.
virtual bool GetInvTransform () const = 0
Computes inverse transform matrix.
virtual void UnsetParent (bool _keep_offset=true) = 0
Removes parent transform relationship.
void UseTranformComp (bool _enable, TransType _type)
Enables or disables specific transform components.
virtual int _debug () const = 0
Debug utility for transform state inspection.

Public Attributes Documentation

variable fld_type

FieldType Field::fld_type;


The documentation for this class was generated from the following file src/compo/Field.h