|
xoreos
0.0.5
|
#include <model_dragonage.h>


Classes | |
| struct | MaterialObject |
| An internal material object. More... | |
| struct | MeshDeclaration |
| An internal mesh declaration part. More... | |
Public Member Functions | |
| ModelNode_DragonAge (Model &model) | |
| ~ModelNode_DragonAge () | |
| void | load (Model_DragonAge::ParserContext &ctx, const ::Aurora::GFF4Struct &nodeGFF) |
Public Member Functions inherited from Graphics::Aurora::ModelNode | |
| ModelNode (Model &model) | |
| virtual | ~ModelNode () |
| const Common::UString & | getName () const |
| Get the node's name. More... | |
| float | getWidth () const |
| Get the width of the node's bounding box. More... | |
| float | getHeight () const |
| Get the height of the node's bounding box. More... | |
| float | getDepth () const |
| Get the depth of the node's bounding box. More... | |
| void | setInvisible (bool invisible) |
| Should the node never be rendered at all? More... | |
| void | setEnvironmentMap (const Common::UString &environmentMap="") |
| Change the environment map on this model node. More... | |
| void | getPosition (float &x, float &y, float &z) const |
| Get the position of the node. More... | |
| void | getRotation (float &x, float &y, float &z) const |
| Get the rotation of the node. More... | |
| void | getOrientation (float &x, float &y, float &z, float &a) const |
| Get the orientation of the node. More... | |
| void | getAbsolutePosition (float &x, float &y, float &z) const |
| Get the position of the node after translate/rotate. More... | |
| glm::mat4 | getAbsolutePosition () const |
| Get the position of the node after translate/rotate. More... | |
| uint16 | getNodeNumber () const |
| void | setPosition (float x, float y, float z) |
| Set the position of the node. More... | |
| void | setRotation (float x, float y, float z) |
| Set the rotation of the node. More... | |
| void | setOrientation (float x, float y, float z, float a) |
| Set the orientation of the node. More... | |
| void | move (float x, float y, float z) |
| Move the node, relative to its current position. More... | |
| void | rotate (float x, float y, float z) |
| Rotate the node, relative to its current rotation. More... | |
| void | setTextures (const std::vector< Common::UString > &textures) |
| Set textures to the node. More... | |
| void | computeInverseBindPose () |
| void | computeAbsoluteTransform () |
| float | getAlpha () |
| Get the alpha (transparency) of the node. More... | |
| void | setAlpha (float alpha, bool isRecursive=true) |
| Set the alpha (transparency) of the node. More... | |
| float | getScaleX () |
| float | getScaleY () |
| float | getScaleZ () |
| ModelNode * | getParent () |
| Get the node's parent. More... | |
| const ModelNode * | getParent () const |
| Get the node's parent. More... | |
| void | setParent (ModelNode *parent) |
| Set the node's parent. More... | |
| std::list< ModelNode * > & | getChildren () |
| Get the node's children. More... | |
| Mesh * | getMesh () const |
| bool | isInFrontOf (const ModelNode &node) const |
| Is this node in front of that other node? More... | |
| void | inheritPosition (ModelNode &node) const |
| void | inheritOrientation (ModelNode &node) const |
Private Member Functions | |
| void | readTransformation (const ::Aurora::GFF4Struct &nodeGFF) |
| void | readChildren (Model_DragonAge::ParserContext &ctx, const ::Aurora::GFF4Struct &nodeGFF) |
| void | readMesh (Model_DragonAge::ParserContext &ctx, const ::Aurora::GFF4Struct &meshGFF) |
| void | sanityCheckMeshChunk (const ::Aurora::GFF4Struct &meshChunk) |
| void | readMeshDecl (const ::Aurora::GFF4Struct &meshChunk, MeshDeclarations &meshDecl) |
| void | createIndexBuffer (const ::Aurora::GFF4Struct &meshChunk, Common::SeekableReadStream &indexData) |
| void | createVertexBuffer (const ::Aurora::GFF4Struct &meshChunk, Common::SeekableReadStream &vertexData, const MeshDeclarations &meshDecl) |
| void | readMAO (const Common::UString &materialName, MaterialObject &material) |
| Read a material object MAO, which can be encoded in either XML or GFF. More... | |
| void | readMAOGFF (Common::SeekableReadStream *maoStream, MaterialObject &material) |
| Read a MAO encoded in a GFF file. More... | |
| void | readMAOXML (Common::SeekableReadStream *maoStream, MaterialObject &material, const Common::UString &fileName) |
| Read a MAO encoded in an XML file. More... | |
| void | loadTextures (const std::vector< Common::UString > &textures, const MaterialObject &material) |
| void | fixTexturesAlpha (const std::vector< Common::UString > &textures) |
| void | fixTexturesHair (const std::vector< Common::UString > &textures) |
Static Private Member Functions | |
| static void | read2Float32 (Common::ReadStream &stream, MeshDeclType type, float *&f) |
| static void | read3Float32 (Common::ReadStream &stream, MeshDeclType type, float *&f) |
| static void | read4Float32 (Common::ReadStream &stream, MeshDeclType type, float *&f) |
Additional Inherited Members | |
Public Types inherited from Graphics::Aurora::ModelNode | |
| enum | EnvironmentMapMode { kModeEnvironmentBlendedUnder, kModeEnvironmentBlendedOver } |
| The way the environment map is applied to a model node. More... | |
Protected Member Functions inherited from Graphics::Aurora::ModelNode | |
| void | loadTextures (const std::vector< Common::UString > &textures) |
| void | createBound () |
| void | createCenter () |
| void | createAbsoluteBound () |
| void | createAbsoluteBound (Common::BoundingBox parentPosition) |
| void | render (RenderPass pass) |
| void | drawSkeleton (const glm::mat4 &parent, bool showInvisible) |
| void | calcRenderTransform (const glm::mat4 &parentTransform) |
| Calculate the transform used for rendering. More... | |
| void | renderImmediate (const glm::mat4 &parentTransform) |
| void | queueRender (const glm::mat4 &parentTransform) |
| void | lockFrame () |
| void | unlockFrame () |
| void | lockFrameIfVisible () |
| void | unlockFrameIfVisible () |
| void | setBufferedPosition (float x, float y, float z) |
| void | setBufferedOrientation (float x, float y, float z, float angle) |
| void | flushBuffers () |
| TextureHandle * | getTextures (uint32 &count) |
| TextureHandle * | getEnvironmentMap (EnvironmentMapMode &mode) |
| void | setMaterial (Shader::ShaderMaterial *material) |
| virtual void | buildMaterial () |
Protected Attributes inherited from Graphics::Aurora::ModelNode | |
| Model * | _model |
| The model this node belongs to. More... | |
| ModelNode * | _parent |
| The node's parent. More... | |
| std::list< ModelNode * > | _children |
| The node's children. More... | |
| Model * | _attachedModel |
| The model that is attached to this node. More... | |
| uint32 | _level |
| Common::UString | _name |
| The node's name. More... | |
| std::vector< Shader::ShaderRenderable > | _renderableArray |
| Damn you bioware. More... | |
| float | _center [3] |
| The node's center. More... | |
| float | _position [3] |
| Position of the node. More... | |
| float | _rotation [3] |
| Node rotation. More... | |
| float | _orientation [4] |
| Orientation of the node. More... | |
| float | _scale [3] |
| Scale of the node. More... | |
| float | _alpha |
| Alpha of the node, used if no _mesh is present in this node. More... | |
| std::vector< PositionKeyFrame > | _positionFrames |
| Keyframes for position animation. More... | |
| std::vector< QuaternionKeyFrame > | _orientationFrames |
| Keyframes for orientation animation. More... | |
| glm::mat4 | _absolutePosition |
| Position of the node after translate/rotate. More... | |
| glm::mat4 | _renderTransform |
| bool | _render |
| Render the node? More... | |
| bool | _dirtyRender |
| Rendering information needs updating. More... | |
| bool | _dirtyMesh |
| Mesh data needs updating. More... | |
| Mesh * | _mesh |
| ModelNode * | _rootStateNode |
| Common::BoundingBox | _boundBox |
| Common::BoundingBox | _absoluteBoundBox |
| uint16 | _nodeNumber |
| glm::mat4 | _invBindPose |
| Inverse bind pose matrix used for animations. More... | |
| glm::mat4 | _absoluteTransform |
| Absolute transformation matrix used for animations. More... | |
| float | _positionBuffer [3] |
| bool | _positionBuffered |
| float | _orientationBuffer [4] |
| bool | _orientationBuffered |
| std::vector< float > | _vertexCoordsBuffer |
| bool | _vertexCoordsBuffered |
| Shader::ShaderMaterial * | _material |
| Shader::ShaderRenderable * | _shaderRenderable |
Definition at line 93 of file model_dragonage.h.
|
private |
Definition at line 157 of file model_dragonage.h.
|
private |
Type information for a mesh declaration part.
Definition at line 122 of file model_dragonage.h.
|
private |
Usage information for a mesh declaration part.
| Enumerator | |
|---|---|
| kMeshDeclUsePosition | Position. |
| kMeshDeclUseBlendWeight | Blend weights. |
| kMeshDeclUseBlendIndices | Blend indices. |
| kMeshDeclUseNormal | Normal. |
| kMeshDeclUsePSize | Point Size. |
| kMeshDeclUseTexCoord | Texture coordinates. |
| kMeshDeclUseTangent | Tangent vector. |
| kMeshDeclUseBinormal | Binormal vector. |
| kMeshDeclUseTessFactor | Tessellation factor. |
| kMeshDeclUsePositionT | PositionT. |
| kMeshDeclUseColor | Color channel. |
| kMeshDeclUseFog | Fog value. |
| kMeshDeclUseDepth | Depth. |
| kMeshDeclUseSample | Sample. |
| kMeshDeclUseUnused | |
Definition at line 102 of file model_dragonage.h.
| Graphics::Aurora::ModelNode_DragonAge::ModelNode_DragonAge | ( | Model & | model | ) |
Definition at line 270 of file model_dragonage.cpp.
Referenced by readChildren().

| Graphics::Aurora::ModelNode_DragonAge::~ModelNode_DragonAge | ( | ) |
Definition at line 273 of file model_dragonage.cpp.
|
private |
Definition at line 641 of file model_dragonage.cpp.
References Graphics::Aurora::ModelNode::_mesh, Graphics::Aurora::ModelNode::Mesh::data, Graphics::IndexBuffer::getData(), Graphics::Mesh::Mesh::getIndexBuffer(), Aurora::GFF4FieldNamesEnum::kGFF4MeshChunkIndexCount, Aurora::GFF4FieldNamesEnum::kGFF4MeshChunkStartIndex, Graphics::Aurora::ModelNode::MeshData::rawMesh, Common::ReadStream::readUint16LE(), Graphics::IndexBuffer::setSize(), and Common::SeekableReadStream::skip().
Referenced by readMesh().


|
private |
Definition at line 655 of file model_dragonage.cpp.
References Graphics::Aurora::ModelNode::_mesh, Common::StackException::add(), Graphics::Aurora::ModelNode::Mesh::data, Graphics::VertexBuffer::getData(), Graphics::Mesh::Mesh::getVertexBuffer(), Aurora::GFF4FieldNamesEnum::kGFF4MeshChunkVertexCount, Aurora::GFF4FieldNamesEnum::kGFF4MeshChunkVertexOffset, Aurora::GFF4FieldNamesEnum::kGFF4MeshChunkVertexSize, kMeshDeclUseColor, kMeshDeclUseNormal, kMeshDeclUsePosition, kMeshDeclUseTexCoord, Common::SeekableReadStream::pos(), Graphics::Aurora::ModelNode::MeshData::rawMesh, read2Float32(), read3Float32(), read4Float32(), Common::SeekableReadStream::seek(), Graphics::VertexBuffer::setVertexDeclInterleave(), Graphics::VCOLOR, Graphics::VNORMAL, Graphics::VPOSITION, and Graphics::VTCOORD.
Referenced by readMesh().


|
private |
Definition at line 870 of file model_dragonage.cpp.
References Graphics::Aurora::Texture::create(), Graphics::ImageDecoder::MipMap::data, Graphics::ImageDecoder::decompress(), Graphics::ImageDecoder::getFormatRaw(), Graphics::ImageDecoder::getMipMap(), Graphics::ImageDecoder::getMipMapCount(), Graphics::ImageDecoder::isCompressed(), Graphics::kPixelFormatRGBA8, Graphics::Aurora::Texture::loadImage(), Graphics::Aurora::ModelNode::loadTextures(), Graphics::ImageDecoder::MipMap::size, and TextureMan.
Referenced by loadTextures().


|
private |
Definition at line 910 of file model_dragonage.cpp.
References Graphics::Aurora::Texture::create(), Graphics::ImageDecoder::MipMap::data, Graphics::ImageDecoder::decompress(), Graphics::ImageDecoder::getFormatRaw(), Graphics::ImageDecoder::getMipMap(), Graphics::ImageDecoder::getMipMapCount(), Graphics::ImageDecoder::isCompressed(), Graphics::kPixelFormatRGBA8, Graphics::Aurora::Texture::loadImage(), Graphics::Aurora::ModelNode::loadTextures(), Graphics::ImageDecoder::MipMap::size, and TextureMan.
Referenced by loadTextures().


| void Graphics::Aurora::ModelNode_DragonAge::load | ( | Model_DragonAge::ParserContext & | ctx, |
| const ::Aurora::GFF4Struct & | nodeGFF | ||
| ) |
Definition at line 494 of file model_dragonage.cpp.
References Graphics::Aurora::ModelNode::_mesh, Graphics::Aurora::ModelNode::_name, Graphics::Aurora::ModelNode::buildMaterial(), Common::UString::c_str(), Graphics::Aurora::ModelNode::createBound(), Graphics::Aurora::ModelNode::Mesh::data, GfxMan, Graphics::Mesh::Mesh::init(), Graphics::Aurora::isType(), Aurora::GFF4FieldNamesEnum::kGFF4MMHName, Graphics::Aurora::kMSHHID, MeshMan, Graphics::Aurora::Model_DragonAge::ParserContext::mmhName, Graphics::Aurora::Model_DragonAge::ParserContext::mshName, Graphics::Aurora::ModelNode::MeshData::rawMesh, readChildren(), readMesh(), readTransformation(), Graphics::Mesh::Mesh::setName(), Graphics::Aurora::Model_DragonAge::ParserContext::state, and warning().
Referenced by Graphics::Aurora::Model_DragonAge::load(), and readChildren().


|
private |
Definition at line 851 of file model_dragonage.cpp.
References Graphics::Aurora::ModelNode_DragonAge::MaterialObject::defaultSemantic, Common::UString::equalsIgnoreCase(), fixTexturesAlpha(), fixTexturesHair(), Graphics::Aurora::ModelNode::loadTextures(), and Graphics::Aurora::ModelNode_DragonAge::MaterialObject::material.
Referenced by readMesh().


|
staticprivate |
Definition at line 277 of file model_dragonage.cpp.
References kMeshDeclTypeFloat16_2, kMeshDeclTypeFloat16_4, kMeshDeclTypeFloat32_2, kMeshDeclTypeFloat32_3, kMeshDeclTypeFloat32_4, kMeshDeclTypeSint16_2, kMeshDeclTypeSint16_2n, kMeshDeclTypeSint16_4, kMeshDeclTypeSint16_4n, kMeshDeclTypeUint16_2n, kMeshDeclTypeUint16_4n, kMeshDeclTypeUint8_4, kMeshDeclTypeUint8_4n, Common::ReadStream::readByte(), readIEEEFloat16(), Common::ReadStream::readIEEEFloatLE(), and Common::ReadStream::readUint16LE().
Referenced by createVertexBuffer().


|
staticprivate |
Definition at line 325 of file model_dragonage.cpp.
References kMeshDeclType1010102, kMeshDeclType1010102n, kMeshDeclTypeColor, kMeshDeclTypeFloat16_4, kMeshDeclTypeFloat32_3, kMeshDeclTypeFloat32_4, kMeshDeclTypeSint16_4, kMeshDeclTypeSint16_4n, kMeshDeclTypeUint16_4n, kMeshDeclTypeUint8_4, kMeshDeclTypeUint8_4n, Common::ReadStream::readByte(), readIEEEFloat16(), Common::ReadStream::readIEEEFloatLE(), Common::ReadStream::readUint16LE(), and Common::ReadStream::readUint32LE().
Referenced by createVertexBuffer().


|
staticprivate |
Definition at line 401 of file model_dragonage.cpp.
References kMeshDeclType1010102, kMeshDeclType1010102n, kMeshDeclTypeColor, kMeshDeclTypeFloat16_4, kMeshDeclTypeFloat32_3, kMeshDeclTypeFloat32_4, kMeshDeclTypeSint16_4, kMeshDeclTypeSint16_4n, kMeshDeclTypeUint16_4n, kMeshDeclTypeUint8_4, kMeshDeclTypeUint8_4n, Common::ReadStream::readByte(), readIEEEFloat16(), Common::ReadStream::readIEEEFloatLE(), Common::ReadStream::readUint16LE(), and Common::ReadStream::readUint32LE().
Referenced by createVertexBuffer().


|
private |
Definition at line 564 of file model_dragonage.cpp.
References Graphics::Aurora::ModelNode::_model, Graphics::Aurora::getChild(), Graphics::Aurora::isType(), Graphics::Aurora::kCRSTID, Aurora::GFF4FieldNamesEnum::kGFF4MMHChildren, Graphics::Aurora::kMSHHID, Graphics::Aurora::kNODEID, load(), ModelNode_DragonAge(), Graphics::Aurora::Model_DragonAge::ParserContext::nodes, and Graphics::Aurora::ModelNode::setParent().
Referenced by load().


|
private |
Read a material object MAO, which can be encoded in either XML or GFF.
Definition at line 826 of file model_dragonage.cpp.
References Common::StackException::add(), Common::UString::c_str(), Common::debugTag(), Aurora::kFileTypeMAO, Graphics::Aurora::kGFFID, Graphics::Aurora::kXMLID, Aurora::AuroraFile::readHeaderID(), readMAOGFF(), readMAOXML(), ResMan, Common::SeekableReadStream::seek(), and TypeMan.
Referenced by readMesh().


|
private |
Read a MAO encoded in a GFF file.
Definition at line 729 of file model_dragonage.cpp.
References Graphics::Aurora::ModelNode_DragonAge::MaterialObject::defaultSemantic, Graphics::Aurora::ModelNode_DragonAge::MaterialObject::floats, Graphics::Aurora::isType(), Graphics::Aurora::kFLOTID, Graphics::Aurora::kFLT4ID, Aurora::GFF4FieldNamesEnum::kGFF4MAODefaultSemantic, Aurora::GFF4FieldNamesEnum::kGFF4MAOFloatName, Aurora::GFF4FieldNamesEnum::kGFF4MAOFloats, Aurora::GFF4FieldNamesEnum::kGFF4MAOFloatValue, Aurora::GFF4FieldNamesEnum::kGFF4MAOMaterial, Aurora::GFF4FieldNamesEnum::kGFF4MAOTextureName, Aurora::GFF4FieldNamesEnum::kGFF4MAOTextureResource, Aurora::GFF4FieldNamesEnum::kGFF4MAOTextures, Aurora::GFF4FieldNamesEnum::kGFF4MAOVectorName, Aurora::GFF4FieldNamesEnum::kGFF4MAOVectors, Aurora::GFF4FieldNamesEnum::kGFF4MAOVectorValue, Graphics::Aurora::kMAOID, Graphics::Aurora::kTEXID, Graphics::Aurora::ModelNode_DragonAge::MaterialObject::material, Graphics::Aurora::ModelNode_DragonAge::MaterialObject::textures, and Graphics::Aurora::ModelNode_DragonAge::MaterialObject::vectors.
Referenced by readMAO().


|
private |
Read a MAO encoded in an XML file.
Definition at line 776 of file model_dragonage.cpp.
References Common::UString::c_str(), Graphics::Aurora::ModelNode_DragonAge::MaterialObject::defaultSemantic, Graphics::Aurora::ModelNode_DragonAge::MaterialObject::floats, Common::XMLNode::getChildren(), Common::XMLNode::getName(), Common::XMLParser::getRoot(), Graphics::Aurora::ModelNode_DragonAge::MaterialObject::material, Graphics::Aurora::ModelNode_DragonAge::MaterialObject::textures, and Graphics::Aurora::ModelNode_DragonAge::MaterialObject::vectors.
Referenced by readMAO().


|
private |
Definition at line 953 of file model_dragonage.cpp.
References Graphics::Aurora::ModelNode::_mesh, Graphics::Aurora::ModelNode::_render, createIndexBuffer(), createVertexBuffer(), Graphics::Aurora::ModelNode::Mesh::data, Common::UString::empty(), Graphics::Aurora::findMeshChunk(), Aurora::GFF4Struct::getData(), Aurora::GFF4FieldNamesEnum::kGFF4MeshIndexData, Aurora::GFF4FieldNamesEnum::kGFF4MeshVertexData, Aurora::GFF4FieldNamesEnum::kGFF4MMHMaterialObject, Aurora::GFF4FieldNamesEnum::kGFF4MMHMeshGroupName, loadTextures(), Graphics::Aurora::Model_DragonAge::ParserContext::mshTop, Graphics::Aurora::ModelNode::MeshData::rawMesh, readMAO(), readMeshDecl(), Graphics::Aurora::ModelNode::Mesh::render, sanityCheckMeshChunk(), and Graphics::Aurora::ModelNode_DragonAge::MaterialObject::textures.
Referenced by load().


|
private |
Definition at line 601 of file model_dragonage.cpp.
References Graphics::Aurora::isType(), Graphics::Aurora::kDECLID, Aurora::GFF4FieldNamesEnum::kGFF4MeshChunkVertexDeclarator, Aurora::GFF4FieldNamesEnum::kGFF4MeshVertexDeclaratorDatatype, Aurora::GFF4FieldNamesEnum::kGFF4MeshVertexDeclaratorMethod, Aurora::GFF4FieldNamesEnum::kGFF4MeshVertexDeclaratorOffset, Aurora::GFF4FieldNamesEnum::kGFF4MeshVertexDeclaratorStream, Aurora::GFF4FieldNamesEnum::kGFF4MeshVertexDeclaratorUsage, Aurora::GFF4FieldNamesEnum::kGFF4MeshVertexDeclaratorUsageIndex, and kMeshDeclUseUnused.
Referenced by readMesh().


|
private |
Definition at line 532 of file model_dragonage.cpp.
References Graphics::Aurora::ModelNode::_orientation, Graphics::Aurora::ModelNode::_position, Graphics::Aurora::getChild(), Graphics::Aurora::isType(), Aurora::GFF4FieldNamesEnum::kGFF4MMHChildren, Aurora::GFF4FieldNamesEnum::kGFF4MMHRotation, Aurora::GFF4FieldNamesEnum::kGFF4MMHTranslation, Graphics::Aurora::kROTAID, Graphics::Aurora::kTRSLID, and Common::rad2deg().
Referenced by load().


|
private |
Definition at line 583 of file model_dragonage.cpp.
References Aurora::GFF4FieldNamesEnum::kGFF4MeshChunkBaseVertexIndex, Aurora::GFF4FieldNamesEnum::kGFF4MeshChunkIndexFormat, Aurora::GFF4FieldNamesEnum::kGFF4MeshChunkMinIndex, and Aurora::GFF4FieldNamesEnum::kGFF4MeshChunkPrimitiveType.
Referenced by readMesh().

1.8.14