Couch
Public Member Functions | List of all members
Spatial Class Reference

#include <Spatial.h>

Inheritance diagram for Spatial:
Inheritance graph
[legend]
Collaboration diagram for Spatial:
Collaboration graph
[legend]

Public Member Functions

virtual Name GetType () const
 
Transform GetTransform ()
 
void SetTransform (Transform transform)
 
Transform GetGlobalTransform ()
 
void SetGlobalTransform (Transform globalTransform)
 
virtual void Translate (Vector3 offset)
 
void RotateX (float phi)
 
void RotateY (float phi)
 
void RotateZ (float phi)
 
void UniformScale (float scale)
 
virtual SpatialCreate ()
 
virtual SpatialDuplicate ()
 
virtual SpatialInstance ()
 
- Public Member Functions inherited from Node
 Node (bool isPrefab)
 
bool IsPrefab ()
 
NodeList GetChildren ()
 
void AddChild (Node *child)
 
NodeGetParent ()
 
void QueueFree ()
 
void DoFree ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Node
static NodeGetRoot ()
 

Detailed Description

Spatial nodes have a transform property. They can be subclassed or instanced as an anchor for their children.

Member Function Documentation

◆ Create()

Spatial * Spatial::Create ( )
virtual

Allocates a new "default" version of this node.

Returns
A reference to the node.

Reimplemented from Node.

Reimplemented in Rigidbody, Mesh, PointLight, DirectionalLight, and Light.

◆ Duplicate()

Spatial * Spatial::Duplicate ( )
virtual

Copies the properties of this node to a newly allocated node, created via Create. Subclasses should override this to copy additional class attributes

Returns
A reference to the duplicate

Reimplemented from Node.

Reimplemented in Rigidbody, Mesh, PointLight, DirectionalLight, and Light.

◆ GetGlobalTransform()

Transform Spatial::GetGlobalTransform ( )

Gets the translation with relation to the world origin

Returns
the global transform

◆ GetTransform()

Transform Spatial::GetTransform ( )

Gets the transform property of this spatial

Returns
The transform

◆ Instance()

Spatial * Spatial::Instance ( )
virtual

Creates an instanced version of this node, by calling Duplicate. Subclasses should override this to perform neccesary tasks for instantiation, i.e. adding a physic object to the physics world. Any children of this node will also be instanced.

Returns
an instanced version of this node.

Reimplemented from Node.

Reimplemented in Rigidbody, Mesh, PointLight, DirectionalLight, and Light.

◆ RotateX()

void Spatial::RotateX ( float  phi)

Rotates the Camera phi radians about the X axis

Parameters
phiThe amount to rotate in radians

◆ RotateY()

void Spatial::RotateY ( float  phi)

Rotates the Camera phi radians about the Y axis

Parameters
phiThe amount to rotate in radians

◆ RotateZ()

void Spatial::RotateZ ( float  phi)

Rotates the Camera phi radians about the Z axis

Parameters
phiThe amount to rotate in radians

◆ SetGlobalTransform()

void Spatial::SetGlobalTransform ( Transform  globalTransform)

Sets the transform with relation to the world origin

Parameters
globalTransformThe global transform property

◆ SetTransform()

void Spatial::SetTransform ( Transform  transform)

Sets the transform property of this spatial.

Parameters
transformThe transform property

◆ Translate()

void Spatial::Translate ( Vector3  offset)
virtual

Directly translates the spatial by offset

Parameters
offsetThe offset of the transform operation

Reimplemented in Rigidbody.

◆ UniformScale()

void Spatial::UniformScale ( float  scale)

Scales the spatial by scale uniformly

Parameters
scaleThe amount to scale by.

The documentation for this class was generated from the following files: