mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 15:11:36 -04:00
Whitespace changes only (including new mangle with whitespace changes as well)
This commit is contained in:
parent
c78e61c96f
commit
0f7d59b4fb
@ -71,6 +71,7 @@ namespace BtOgre {
|
||||
vbuf->unlock();
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void VertexIndexToShape::addAnimatedVertexData(const Ogre::VertexData *vertex_data,
|
||||
const Ogre::VertexData *blend_data,
|
||||
@ -116,6 +117,7 @@ namespace BtOgre {
|
||||
}
|
||||
vbuf->unlock();
|
||||
}
|
||||
|
||||
{
|
||||
const Ogre::VertexElement* bneElem = vertex_data->vertexDeclaration->findElementBySemantic(Ogre::VES_BLEND_INDICES);
|
||||
assert (bneElem);
|
||||
@ -158,6 +160,7 @@ namespace BtOgre {
|
||||
vbuf->unlock();
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void VertexIndexToShape::addIndexData(IndexData *data, const unsigned int offset)
|
||||
{
|
||||
@ -201,6 +204,7 @@ namespace BtOgre {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
Real VertexIndexToShape::getRadius()
|
||||
{
|
||||
@ -211,6 +215,7 @@ namespace BtOgre {
|
||||
}
|
||||
return mBoundRadius;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
Vector3 VertexIndexToShape::getSize()
|
||||
{
|
||||
@ -241,21 +246,25 @@ namespace BtOgre {
|
||||
|
||||
return mBounds;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
const Ogre::Vector3* VertexIndexToShape::getVertices()
|
||||
{
|
||||
return mVertexBuffer;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
unsigned int VertexIndexToShape::getVertexCount()
|
||||
{
|
||||
return mVertexCount;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
const unsigned int* VertexIndexToShape::getIndices()
|
||||
{
|
||||
return mIndexBuffer;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
unsigned int VertexIndexToShape::getIndexCount()
|
||||
{
|
||||
@ -274,6 +283,7 @@ namespace BtOgre {
|
||||
|
||||
return shape;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
btBoxShape* VertexIndexToShape::createBox()
|
||||
{
|
||||
@ -288,6 +298,7 @@ namespace BtOgre {
|
||||
|
||||
return shape;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
btCylinderShape* VertexIndexToShape::createCylinder()
|
||||
{
|
||||
@ -302,6 +313,7 @@ namespace BtOgre {
|
||||
|
||||
return shape;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
btConvexHullShape* VertexIndexToShape::createConvex()
|
||||
{
|
||||
@ -310,6 +322,7 @@ namespace BtOgre {
|
||||
|
||||
return new btConvexHullShape((btScalar*) &mVertexBuffer[0].x, mVertexCount, sizeof(Vector3));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
btBvhTriangleMeshShape* VertexIndexToShape::createTrimesh()
|
||||
{
|
||||
@ -356,6 +369,7 @@ namespace BtOgre {
|
||||
|
||||
return shape;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
VertexIndexToShape::~VertexIndexToShape()
|
||||
{
|
||||
@ -373,6 +387,7 @@ namespace BtOgre {
|
||||
delete mBoneIndex;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
VertexIndexToShape::VertexIndexToShape(const Matrix4 &transform) :
|
||||
mVertexBuffer (0),
|
||||
@ -399,10 +414,12 @@ namespace BtOgre {
|
||||
mNode (0)
|
||||
{
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
StaticMeshToShapeConverter::~StaticMeshToShapeConverter()
|
||||
{
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
StaticMeshToShapeConverter::StaticMeshToShapeConverter(Entity *entity, const Matrix4 &transform) :
|
||||
VertexIndexToShape(transform),
|
||||
@ -411,6 +428,7 @@ namespace BtOgre {
|
||||
{
|
||||
addEntity(entity, transform);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
StaticMeshToShapeConverter::StaticMeshToShapeConverter(Renderable *rend, const Matrix4 &transform) :
|
||||
VertexIndexToShape(transform),
|
||||
@ -424,6 +442,7 @@ namespace BtOgre {
|
||||
VertexIndexToShape::addIndexData(op.indexData);
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void StaticMeshToShapeConverter::addEntity(Entity *entity,const Matrix4 &transform)
|
||||
{
|
||||
@ -458,6 +477,7 @@ namespace BtOgre {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void StaticMeshToShapeConverter::addMesh(const MeshPtr &mesh, const Matrix4 &transform)
|
||||
{
|
||||
@ -510,6 +530,7 @@ namespace BtOgre {
|
||||
{
|
||||
addEntity(entity, transform);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
AnimatedMeshToShapeConverter::AnimatedMeshToShapeConverter() :
|
||||
VertexIndexToShape(),
|
||||
@ -519,11 +540,13 @@ namespace BtOgre {
|
||||
mTransformedVerticesTempSize(0)
|
||||
{
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
AnimatedMeshToShapeConverter::~AnimatedMeshToShapeConverter()
|
||||
{
|
||||
delete[] mTransformedVerticesTemp;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void AnimatedMeshToShapeConverter::addEntity(Entity *entity,const Matrix4 &transform)
|
||||
{
|
||||
@ -569,6 +592,7 @@ namespace BtOgre {
|
||||
|
||||
mEntity->removeSoftwareAnimationRequest(false);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void AnimatedMeshToShapeConverter::addMesh(const MeshPtr &mesh, const Matrix4 &transform)
|
||||
{
|
||||
@ -609,6 +633,7 @@ namespace BtOgre {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
bool AnimatedMeshToShapeConverter::getBoneVertices(unsigned char bone,
|
||||
unsigned int &vertex_count,
|
||||
@ -649,6 +674,7 @@ namespace BtOgre {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
btBoxShape* AnimatedMeshToShapeConverter::createAlignedBox(unsigned char bone,
|
||||
const Vector3 &bonePosition,
|
||||
@ -685,6 +711,7 @@ namespace BtOgre {
|
||||
|
||||
return box;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
bool AnimatedMeshToShapeConverter::getOrientedBox(unsigned char bone,
|
||||
const Vector3 &bonePosition,
|
||||
@ -759,6 +786,7 @@ namespace BtOgre {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
btBoxShape *AnimatedMeshToShapeConverter::createOrientedBox(unsigned char bone,
|
||||
const Vector3 &bonePosition,
|
||||
@ -789,12 +817,14 @@ namespace BtOgre {
|
||||
DynamicRenderable::DynamicRenderable()
|
||||
{
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
DynamicRenderable::~DynamicRenderable()
|
||||
{
|
||||
delete mRenderOp.vertexData;
|
||||
delete mRenderOp.indexData;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void DynamicRenderable::initialize(RenderOperation::OperationType operationType,
|
||||
bool useIndices)
|
||||
@ -813,6 +843,7 @@ namespace BtOgre {
|
||||
// Create vertex declaration
|
||||
createVertexDeclaration();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void DynamicRenderable::prepareHardwareBuffers(size_t vertexCount,
|
||||
size_t indexCount)
|
||||
@ -897,11 +928,13 @@ namespace BtOgre {
|
||||
mRenderOp.indexData->indexCount = indexCount;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
Real DynamicRenderable::getBoundingRadius(void) const
|
||||
{
|
||||
return Math::Sqrt(std::max(mBox.getMaximum().squaredLength(), mBox.getMinimum().squaredLength()));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
Real DynamicRenderable::getSquaredViewDepth(const Camera* cam) const
|
||||
{
|
||||
@ -924,6 +957,7 @@ namespace BtOgre {
|
||||
POSITION_BINDING,
|
||||
TEXCOORD_BINDING
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
DynamicLines::DynamicLines(OperationType opType)
|
||||
{
|
||||
@ -931,43 +965,51 @@ namespace BtOgre {
|
||||
setMaterial("BaseWhiteNoLighting");
|
||||
mDirty = true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
DynamicLines::~DynamicLines()
|
||||
{
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void DynamicLines::setOperationType(OperationType opType)
|
||||
{
|
||||
mRenderOp.operationType = opType;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
RenderOperation::OperationType DynamicLines::getOperationType() const
|
||||
{
|
||||
return mRenderOp.operationType;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void DynamicLines::addPoint(const Vector3 &p)
|
||||
{
|
||||
mPoints.push_back(p);
|
||||
mDirty = true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void DynamicLines::addPoint(Real x, Real y, Real z)
|
||||
{
|
||||
mPoints.push_back(Vector3(x,y,z));
|
||||
mDirty = true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
const Vector3& DynamicLines::getPoint(unsigned short index) const
|
||||
{
|
||||
assert(index < mPoints.size() && "Point index is out of bounds!!");
|
||||
return mPoints[index];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
unsigned short DynamicLines::getNumPoints(void) const
|
||||
{
|
||||
return (unsigned short)mPoints.size();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void DynamicLines::setPoint(unsigned short index, const Vector3 &value)
|
||||
{
|
||||
@ -976,23 +1018,27 @@ namespace BtOgre {
|
||||
mPoints[index] = value;
|
||||
mDirty = true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void DynamicLines::clear()
|
||||
{
|
||||
mPoints.clear();
|
||||
mDirty = true;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void DynamicLines::update()
|
||||
{
|
||||
if (mDirty) fillHardwareBuffers();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void DynamicLines::createVertexDeclaration()
|
||||
{
|
||||
VertexDeclaration *decl = mRenderOp.vertexData->vertexDeclaration;
|
||||
decl->addElement(POSITION_BINDING, 0, VET_FLOAT3, VES_POSITION);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------
|
||||
void DynamicLines::fillHardwareBuffers()
|
||||
{
|
||||
|
@ -130,7 +130,6 @@ protected:
|
||||
Ogre::Vector3 *axis,
|
||||
Ogre::Vector3 ¢er);
|
||||
|
||||
|
||||
Ogre::Entity* mEntity;
|
||||
Ogre::SceneNode* mNode;
|
||||
|
||||
|
@ -126,7 +126,7 @@ namespace Physic
|
||||
~PhysicEngine();
|
||||
|
||||
/**
|
||||
*create a RigidBody.It does not add it to the simulation, but it does add it to the rigidBody Map,
|
||||
* Create a RigidBody.It does not add it to the simulation, but it does add it to the rigidBody Map,
|
||||
* so you can get it with the getRigidBody function.
|
||||
*/
|
||||
RigidBody* createRigidBody(std::string mesh,std::string name);
|
||||
@ -142,7 +142,7 @@ namespace Physic
|
||||
void removeRigidBody(std::string name);
|
||||
|
||||
/**
|
||||
*delete a RigidBody, and remove it from RigidBodyMap.
|
||||
* Delete a RigidBody, and remove it from RigidBodyMap.
|
||||
*/
|
||||
void deleteRigidBody(std::string name);
|
||||
|
||||
@ -163,7 +163,7 @@ namespace Physic
|
||||
void removeCharacter(std::string name);
|
||||
|
||||
/**
|
||||
*return a pointer to a character
|
||||
* Return a pointer to a character
|
||||
* TODO:check if the actor exist...
|
||||
*/
|
||||
PhysicActor* getCharacter(std::string name);
|
||||
|
2
mangle
2
mangle
@ -1 +1 @@
|
||||
Subproject commit a05046026ec9edb1e528fac2c70f887239302237
|
||||
Subproject commit f3c9694bf249a34eae05f0304e6bfc120014ce8c
|
Loading…
x
Reference in New Issue
Block a user