mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 16:45:33 +00:00
Revert "Store the RigGeometry's source vertices and normals directly"
This reverts commit 7a347e3483
.
This commit is contained in:
parent
60c8c4fdda
commit
c73ec71123
2 changed files with 5 additions and 9 deletions
|
@ -82,14 +82,12 @@ RigGeometry::RigGeometry(const RigGeometry ©, const osg::CopyOp ©op)
|
|||
, mLastFrameNumber(0)
|
||||
, mBoundsFirstFrame(true)
|
||||
{
|
||||
mSourceVertices = copy.mSourceVertices;
|
||||
mSourceNormals = copy.mSourceNormals;
|
||||
setSourceGeometry(copy.mSourceGeometry);
|
||||
}
|
||||
|
||||
void RigGeometry::setSourceGeometry(osg::ref_ptr<osg::Geometry> sourceGeometry)
|
||||
{
|
||||
mSourceVertices = static_cast<osg::Vec3Array*>(sourceGeometry->getVertexArray());
|
||||
mSourceNormals = static_cast<osg::Vec3Array*>(sourceGeometry->getNormalArray());
|
||||
mSourceGeometry = sourceGeometry;
|
||||
|
||||
osg::Geometry& from = *sourceGeometry;
|
||||
|
||||
|
@ -225,8 +223,8 @@ void RigGeometry::update(osg::NodeVisitor* nv)
|
|||
mSkeleton->updateBoneMatrices(nv);
|
||||
|
||||
// skinning
|
||||
osg::Vec3Array* positionSrc = mSourceVertices;
|
||||
osg::Vec3Array* normalSrc = mSourceNormals;
|
||||
osg::Vec3Array* positionSrc = static_cast<osg::Vec3Array*>(mSourceGeometry->getVertexArray());
|
||||
osg::Vec3Array* normalSrc = static_cast<osg::Vec3Array*>(mSourceGeometry->getNormalArray());
|
||||
|
||||
osg::Vec3Array* positionDst = static_cast<osg::Vec3Array*>(getVertexArray());
|
||||
osg::Vec3Array* normalDst = static_cast<osg::Vec3Array*>(getNormalArray());
|
||||
|
|
|
@ -41,7 +41,6 @@ namespace SceneUtil
|
|||
|
||||
/// Initialize this geometry from the source geometry.
|
||||
/// @note The source geometry will not be modified.
|
||||
/// @note The source geometry's normal and vertex arrays must be an osg::Vec3Array.
|
||||
void setSourceGeometry(osg::ref_ptr<osg::Geometry> sourceGeom);
|
||||
|
||||
// Called automatically by our CullCallback
|
||||
|
@ -51,8 +50,7 @@ namespace SceneUtil
|
|||
void updateBounds(osg::NodeVisitor* nv);
|
||||
|
||||
private:
|
||||
osg::ref_ptr<osg::Vec3Array> mSourceVertices;
|
||||
osg::ref_ptr<osg::Vec3Array> mSourceNormals;
|
||||
osg::ref_ptr<osg::Geometry> mSourceGeometry;
|
||||
Skeleton* mSkeleton;
|
||||
|
||||
osg::NodePath mSkelToGeomPath;
|
||||
|
|
Loading…
Reference in a new issue