25 #ifndef GRAPHICS_AURORA_MODELNODE_H 26 #define GRAPHICS_AURORA_MODELNODE_H 86 void getPosition(
float &x,
float &y,
float &z)
const;
88 void getRotation(
float &x,
float &y,
float &z)
const;
108 void move (
float x,
float y,
float z);
110 void rotate(
float x,
float y,
float z);
113 void setTextures(
const std::vector<Common::UString> &textures);
122 void setAlpha(
float alpha,
bool isRecursive =
true);
263 void loadTextures(
const std::vector<Common::UString> &textures);
271 void drawSkeleton(
const glm::mat4 &parent,
bool showInvisible);
276 void queueRender(
const glm::mat4 &parentTransform);
333 #endif // GRAPHICS_AURORA_MODELNODE_H void setBufferedPosition(float x, float y, float z)
std::vector< float > boneMapping
void lockFrameIfVisible()
void setEnvironmentMap(const Common::UString &environmentMap="")
Change the environment map on this model node.
EnvironmentMapMode
The way the environment map is applied to a model node.
static void renderGeometryEnvMappedOver(Mesh &mesh)
Shader renderable, a class for easier managing of a collection of items (surface, material...
void setInvisible(bool invisible)
Should the node never be rendered at all?
A class holding an UTF-8 string.
void setPosition(float x, float y, float z)
Set the position of the node.
bool _orientationBuffered
std::vector< float > boneWeights
Shader::ShaderRenderable * _shaderRenderable
void loadTextures(const std::vector< Common::UString > &textures)
void getRotation(float &x, float &y, float &z) const
Get the rotation of the node.
std::list< ModelNode * > & getChildren()
Get the node's children.
bool render
Render this mesh?
void setBufferedOrientation(float x, float y, float z, float angle)
glm::mat4 _invBindPose
Inverse bind pose matrix used for animations.
float _rotation[3]
Node rotation.
bool _dirtyMesh
Mesh data needs updating.
float getHeight() const
Get the height of the node's bounding box.
void queueRender(const glm::mat4 &parentTransform)
void setParent(ModelNode *parent)
Set the node's parent.
void rotate(float x, float y, float z)
Rotate the node, relative to its current rotation.
Diffuse textures first, then blend the environment map in.
bool _render
Render the node?
TextureHandle * getEnvironmentMap(EnvironmentMapMode &mode)
void getPosition(float &x, float &y, float &z) const
Get the position of the node.
float _alpha
Alpha of the node, used if no _mesh is present in this node.
TextureHandle * getTextures(uint32 &count)
A bounding box around 3D points.
void computeInverseBindPose()
A handle to an Aurora texture.
std::vector< ModelNode * > boneNodeMap
float getAlpha()
Get the alpha (transparency) of the node.
Environment map first, then blend the diffuse textures in.
Model * _model
The model this node belongs to.
float _scale[3]
Scale of the node.
void setAlpha(float alpha, bool isRecursive=true)
Set the alpha (transparency) of the node.
bool _dirtyRender
Rendering information needs updating.
std::vector< float > initialVertexCoords
Initial node vertex coordinates.
void computeAbsoluteTransform()
float selfIllum[3]
Self illumination color.
Basic Aurora graphics types.
void setRotation(float x, float y, float z)
Set the rotation of the node.
void unlockFrameIfVisible()
TextureHandle envMap
The environment map texture.
float getWidth() const
Get the width of the node's bounding box.
bool _vertexCoordsBuffered
glm::mat4 _renderTransform
virtual void buildMaterial()
static bool renderableMesh(Mesh *mesh)
glm::mat4 _absoluteTransform
Absolute transformation matrix used for animations.
void createAbsoluteBound()
float getDepth() const
Get the depth of the node's bounding box.
std::vector< float > constraints
float ambient[3]
Ambient color.
void setMaterial(Shader::ShaderMaterial *material)
float specular[3]
Specular color.
uint32 transparencyHintFull
std::vector< QuaternionKeyFrame > _orientationFrames
Keyframes for orientation animation.
bool isInFrontOf(const ModelNode &node) const
Is this node in front of that other node?
float _position[3]
Position of the node.
static void renderGeometry(Mesh &mesh)
void render(RenderPass pass)
std::vector< TextureHandle > textures
Textures.
void renderImmediate(const glm::mat4 &parentTransform)
std::vector< float > boneMappingId
Common::BoundingBox _boundBox
Graphics::Mesh::Mesh * rawMesh
Node raw mesh data.
void inheritPosition(ModelNode &node) const
Common::UString _name
The node's name.
std::vector< Shader::ShaderRenderable > _renderableArray
Damn you bioware.
bool shadow
Does the node have a shadow?
EnvironmentMapMode envMapMode
The way the environment map is applied.
glm::mat4 getAbsolutePosition() const
Get the position of the node after translate/rotate.
float wirecolor[3]
Color of the wireframe.
float diffuse[3]
Diffuse color.
float _orientation[4]
Orientation of the node.
float _orientationBuffer[4]
const Common::UString & getName() const
Get the node's name.
void move(float x, float y, float z)
Move the node, relative to its current position.
std::vector< float > _vertexCoordsBuffer
ModelNode * _rootStateNode
bool isBackgroundGeometry
static void renderGeometryEnvMappedUnder(Mesh &mesh)
uint16 getNodeNumber() const
std::list< ModelNode * > _children
The node's children.
Common::BoundingBox _absoluteBoundBox
std::vector< PositionKeyFrame > _positionFrames
Keyframes for position animation.
glm::mat4 _absolutePosition
Position of the node after translate/rotate.
const Common::BoundingBox & getAbsoluteBound() const
void calcRenderTransform(const glm::mat4 &parentTransform)
Calculate the transform used for rendering.
ModelNode * getParent()
Get the node's parent.
ModelNode * _parent
The node's parent.
Model * _attachedModel
The model that is attached to this node.
float _center[3]
The node's center.
void getOrientation(float &x, float &y, float &z, float &a) const
Get the orientation of the node.
Shader::ShaderMaterial * _material
void drawSkeleton(const glm::mat4 &parent, bool showInvisible)
static void renderGeometryNormal(Mesh &mesh)
void setOrientation(float x, float y, float z, float a)
Set the orientation of the node.
void setTextures(const std::vector< Common::UString > &textures)
Set textures to the node.
void inheritOrientation(ModelNode &node) const