Changeset 405 for cafu/trunk
- Timestamp:
- 10/11/11 10:39:53 (7 months ago)
- Location:
- cafu/trunk/Libs/Models
- Files:
-
- 2 modified
-
Model_cmdl.cpp (modified) (5 diffs)
-
Model_cmdl.hpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cafu/trunk/Libs/Models/Model_cmdl.cpp
r400 r405 21 21 22 22 #include "Model_cmdl.hpp" 23 #include "AnimPose.hpp" // Only for implementing the "old" ModelT interface methods.24 23 #include "Loader.hpp" 25 24 #include "MaterialSystem/Material.hpp" … … 236 235 237 236 237 // TEMPORARY! 238 #if defined(_WIN32) && defined(_MSC_VER) 239 // Turn off "warning C4355: 'this' : used in base member initializer list". 240 #pragma warning(disable:4355) 241 #endif 242 243 238 244 CafuModelT::CafuModelT(ModelLoaderT& Loader) 239 245 : m_FileName(Loader.GetFileName()), … … 241 247 m_UseGivenTangentSpace(Loader.UseGivenTS()), // Should we use the fixed, given tangent space, or recompute it ourselves here? 242 248 m_BindPoseBB(Vector3fT()) // Re-initialized in InitMeshes() calling RecomputeBindPoseBB(), but start with a valid box anyways (e.g. for testing models that have a skeleton, but no mesh). 249 , m_TEMP_Pose(*this) 243 250 { 244 251 // No matter the actual model file format (that is, even if the file format is not "cmdl"), … … 954 961 void CafuModelT::Draw(int SequenceNr, float FrameNr, float LodDist, const ModelT* /*SubModel*/) const 955 962 { 956 AnimPoseT Pose(*this, SequenceNr, FrameNr); // TODO: This is reconstructed on each call -- no caching at all! 957 958 Pose.Draw(-1 /*default skin*/, LodDist); 963 m_TEMP_Pose.SetSequNr(SequenceNr); 964 m_TEMP_Pose.SetFrameNr(FrameNr); 965 966 m_TEMP_Pose.Draw(-1 /*default skin*/, LodDist); 959 967 } 960 968 … … 1033 1041 bool CafuModelT::TraceRay(int SequenceNr, float FrameNr, int SkinNr, const Vector3fT& RayOrigin, const Vector3fT& RayDir, TraceResultT& Result) const 1034 1042 { 1035 AnimPoseT Pose(*this, SequenceNr, FrameNr); // TODO: This is reconstructed on each call -- no caching at all! 1036 1037 return Pose.TraceRay(SkinNr, RayOrigin, RayDir, Result); 1043 m_TEMP_Pose.SetSequNr(SequenceNr); 1044 m_TEMP_Pose.SetFrameNr(FrameNr); 1045 1046 return m_TEMP_Pose.TraceRay(SkinNr, RayOrigin, RayDir, Result); 1038 1047 } 1039 1048 -
cafu/trunk/Libs/Models/Model_cmdl.hpp
r400 r405 28 28 #include "Math3D/BoundingBox.hpp" 29 29 #include "Math3D/Matrix.hpp" 30 #include "AnimPose.hpp" // Only for TEMPORARILY implementing the "old" ModelT interface methods. 30 31 #include "Model.hpp" 31 32 … … 314 315 // const bool m_CastShadows; ///< Should this model cast shadows? 315 316 BoundingBox3fT m_BindPoseBB; ///< [REMOVE???] The bounding-box for the base pose of the model. 317 318 mutable AnimPoseT m_TEMP_Pose; ///< TEMPORARY! 316 319 }; 317 320
