Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
AngelOgre_OgreSceneNode.h
Go to the documentation of this file.
1namespace AngelOgre { // Dummy namespace, just to distinguish AngelScript from C++
2
20 class SceneNode : public Node
21 {
22
23 public:
24
25
32
36 MovableObject@ getAttachedObject(const string& name);
37
44
47
49 MovableObject@ detachObject(const string& name);
50
53 void detachAllObjects(void);
54
58 bool isInSceneGraph(void) const;
59
66
73
84 void removeAndDestroyChild(const string& name);
85
87 void removeAndDestroyChild(uint16 index);
88
91
92
100
105 void showBoundingBox(bool bShow);
106
112 void hideBoundingBox(bool bHide);
113
121 bool getShowBoundingBox() const;
122
130 const vector3& translate = vector3(0.f, 0.f, 0.f),
131 const Quaternion& rotate = quaternion() );
132
142 SceneNode@ createChildSceneNode(const string& name, const vector3& translate = vector3(0.f, 0.f, 0.f), const Quaternion& rotate = quaternion());
143
144
145
160 void setFixedYawAxis( bool useFixed, const vector3& fixedAxis = vector3(0.f, 1.f, 0.f) );
161
164 void yaw(const Radian& angle, TransformSpace relativeTo = TS_LOCAL);
175 void setDirection(const vector3& vec, TransformSpace relativeTo = TS_LOCAL,
176 const vector3& localDirectionVector = vector3(0.f, 0.f, -1.f));
177
184 void lookAt( const vector3& targetPoint, TransformSpace relativeTo,
185 const vector3& localDirectionVector = vector3(0.f, 0.f, -1.f));
186
205 void setAutoTracking(bool enabled, SceneNode@ const target = 0,
206 const vector3& localDirectionVector = vector3(0.f, 0.f, -1.f),
207 const vector3& offset = vector3(0.f, 0.f, 0.f));
208
211
213 const vector3& getAutoTrackOffset(void);
214
216 const vector3& getAutoTrackLocalDirection(void);
217
220
229 void setVisible(bool visible, bool cascade = true);
230
238 void flipVisibility(bool cascade = true);
239
249 void setDebugDisplayEnabled(bool enabled, bool cascade = true);
250
251 };
252
255
256} // namespace AngelOgre (dummy, just to distinguish AngelScript from C++)
257
258
quaternion()
CReadonlyScriptArrayView< Ogre::MovableObject * > MovableObjectArray
Abstract class defining a movable object in a scene.
Encapsulates everything renderable by OGRE - use game.getSceneManager() to get it.
Class representing a node in the scene graph.
const vector3 & getAutoTrackLocalDirection(void)
Get the auto tracking local direction for this node, if it is auto tracking.
void yaw(const Radian &angle, TransformSpace relativeTo=TS_LOCAL)
Rotate the node around the Y-axis.
const vector3 & getAutoTrackOffset(void)
Get the auto tracking offset for this node, if the node is auto tracking.
SceneNode getAutoTrackTarget(void)
Get the auto tracking target for this node, if any.
void removeAndDestroyChild(SceneNode@ child)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void detachAllObjects(void)
Detaches all objects attached to this node.
void attachObject(MovableObject@ obj)
Adds an instance of a scene object to this node.
void setVisible(bool visible, bool cascade=true)
Makes all objects attached to this node become visible / invisible.
void setAutoTracking(bool enabled, SceneNode@ const target=0, const vector3 &localDirectionVector=vector3(0.f, 0.f, -1.f), const vector3 &offset=vector3(0.f, 0.f, 0.f))
Enables / disables automatic tracking of another SceneNode.
void setDirection(const vector3 &vec, TransformSpace relativeTo=TS_LOCAL, const vector3 &localDirectionVector=vector3(0.f, 0.f, -1.f))
Sets the node's direction vector ie it's local -z.
void detachObject(MovableObject@ obj)
Detaches an object by pointer.
SceneNode createChildSceneNode(const string &name, const vector3 &translate=vector3(0.f, 0.f, 0.f), const Quaternion &rotate=quaternion())
Creates a new named SceneNode as a child of this node.
SceneNode createChildSceneNode(const vector3 &translate=vector3(0.f, 0.f, 0.f), const Quaternion &rotate=quaternion())
Creates an unnamed new SceneNode as a child of this node.
SceneNode getParentSceneNode(void)
Gets the parent of this SceneNode.
void removeAndDestroyAllChildren(void)
Removes and destroys all children of this node.
MovableObject detachObject(uint16 index)
Detaches the indexed object from this scene node.
bool getShowBoundingBox() const
This allows scene managers to determine if the node's bounding box should be added to the rendering q...
bool isInSceneGraph(void) const
Determines whether this node is in the scene graph, i.e.
void flipVisibility(bool cascade=true)
Inverts the visibility of all objects attached to this node.
void setFixedYawAxis(bool useFixed, const vector3 &fixedAxis=vector3(0.f, 1.f, 0.f))
Tells the node whether to yaw around it's own local Y axis or a fixed axis of choice.
MovableObjectArray getAttachedObjects()
The MovableObjects attached to this node.
void showBoundingBox(bool bShow)
Allows the showing of the node's bounding box.
void setDebugDisplayEnabled(bool enabled, bool cascade=true)
Tells all objects attached to this node whether to display their debug information or not.
MovableObject getAttachedObject(const string &name)
Retrieves a pointer to an attached object.
void lookAt(const vector3 &targetPoint, TransformSpace relativeTo, const vector3 &localDirectionVector=vector3(0.f, 0.f, -1.f))
Points the local -Z direction of this node at a point in space.
MovableObject detachObject(const string &name)
Detaches the named object from this node and returns a pointer to it.
void removeAndDestroyChild(uint16 index)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void hideBoundingBox(bool bHide)
Allows the overriding of the node's bounding box over the SceneManager's bounding box setting.
void removeAndDestroyChild(const string &name)
This method removes and destroys the named child and all of its children.
SceneManager getCreator(void) const
Gets the creator of this scene node.
OGRE-AngelScript bindings; Actually named Ogre in the scripts, just changed for docs to separate thin...