Browse Source

Mild renaming

Panagiotis Christopoulos Charitos 9 years ago
parent
commit
45f7ec31d4

+ 1 - 1
include/anki/physics/PhysicsWorld.h

@@ -40,7 +40,7 @@ public:
 	}
 
 #ifdef ANKI_BUILD
-	NewtonWorld* _getNewtonWorld() const
+	NewtonWorld* getNewtonWorld() const
 	{
 		ANKI_ASSERT(m_world);
 		return m_world;

+ 2 - 0
include/anki/resource/CollisionResource.h

@@ -17,10 +17,12 @@ namespace anki
 /// Load a collision shape.
 ///
 /// XML file format:
+/// @code
 /// <collisionShape>
 /// 	<type>sphere | box | mesh</type>
 /// 	<value>radius | extend | path/to/mesh</value>
 /// </collisionShape>
+/// @endcode
 class CollisionResource : public ResourceObject
 {
 public:

+ 1 - 1
include/anki/resource/ResourceManager.h

@@ -161,7 +161,7 @@ anki_internal:
 		return *m_gr;
 	}
 
-	PhysicsWorld& _getPhysicsWorld()
+	PhysicsWorld& getPhysicsWorld()
 	{
 		ANKI_ASSERT(m_physics);
 		return *m_physics;

+ 2 - 2
include/anki/scene/SceneGraph.h

@@ -154,7 +154,7 @@ public:
 	}
 
 anki_internal:
-	ResourceManager& _getResourceManager()
+	ResourceManager& getResourceManager()
 	{
 		return *m_resources;
 	}
@@ -164,7 +164,7 @@ anki_internal:
 		return *m_gr;
 	}
 
-	PhysicsWorld& _getPhysicsWorld()
+	PhysicsWorld& getPhysicsWorld()
 	{
 		return *m_physics;
 	}

+ 2 - 2
src/physics/PhysicsBody.cpp

@@ -63,7 +63,7 @@ Error PhysicsBody::create(const PhysicsBodyInitInfo& init)
 	}
 	else
 	{
-		m_body = NewtonCreateDynamicBody(m_world->_getNewtonWorld(),
+		m_body = NewtonCreateDynamicBody(m_world->getNewtonWorld(),
 			init.m_shape->_getNewtonShape(),
 			&trf(0, 0));
 	}
@@ -76,7 +76,7 @@ Error PhysicsBody::create(const PhysicsBodyInitInfo& init)
 
 	// Material
 	NewtonBodySetMaterialGroupID(
-		m_body, NewtonMaterialGetDefaultGroupID(m_world->_getNewtonWorld()));
+		m_body, NewtonMaterialGetDefaultGroupID(m_world->getNewtonWorld()));
 
 	// User data & callbacks
 	NewtonBodySetUserData(m_body, this);

+ 4 - 4
src/physics/PhysicsCollisionShape.cpp

@@ -34,8 +34,8 @@ Error PhysicsSphere::create(PhysicsCollisionShapeInitInfo& init, F32 radius)
 {
 	Error err = ErrorCode::NONE;
 
-	m_shape = NewtonCreateSphere(
-		m_world->_getNewtonWorld(), radius, m_gid++, nullptr);
+	m_shape =
+		NewtonCreateSphere(m_world->getNewtonWorld(), radius, m_gid++, nullptr);
 	if(!m_shape)
 	{
 		ANKI_LOGE("NewtonCreateSphere() failed");
@@ -55,7 +55,7 @@ Error PhysicsBox::create(
 {
 	Error err = ErrorCode::NONE;
 
-	m_shape = NewtonCreateBox(m_world->_getNewtonWorld(),
+	m_shape = NewtonCreateBox(m_world->getNewtonWorld(),
 		extend.x(),
 		extend.y(),
 		extend.z(),
@@ -81,7 +81,7 @@ Error PhysicsTriangleSoup::create(PhysicsCollisionShapeInitInfo& init,
 	const U16* indices,
 	U32 indicesCount)
 {
-	m_shape = NewtonCreateTreeCollision(m_world->_getNewtonWorld(), 0);
+	m_shape = NewtonCreateTreeCollision(m_world->getNewtonWorld(), 0);
 	if(!m_shape)
 	{
 		ANKI_LOGE("NewtonCreateBox() failed");

+ 1 - 1
src/physics/PhysicsDrawer.cpp

@@ -19,7 +19,7 @@ struct CallbackData
 //==============================================================================
 void PhysicsDrawer::drawWorld(const PhysicsWorld& world)
 {
-	NewtonWorld* nworld = world._getNewtonWorld();
+	NewtonWorld* nworld = world.getNewtonWorld();
 	for(NewtonBody* body = NewtonWorldGetFirstBody(nworld); body != nullptr;
 		body = NewtonWorldGetNextBody(nworld, body))
 	{

+ 4 - 4
src/physics/PhysicsPlayerController.cpp

@@ -147,7 +147,7 @@ PhysicsPlayerController::~PhysicsPlayerController()
 Error PhysicsPlayerController::create(
 	const PhysicsPlayerControllerInitInfo& init)
 {
-	NewtonWorld* world = m_world->_getNewtonWorld();
+	NewtonWorld* world = m_world->getNewtonWorld();
 
 	m_restrainingDistance = MIN_RESTRAINING_DISTANCE;
 	m_innerRadius = init.m_innerRadius;
@@ -248,7 +248,7 @@ Error PhysicsPlayerController::create(
 	NewtonBodySetUserData(m_body, this);
 	NewtonBodySetTransformCallback(m_body, onTransformCallback);
 	NewtonBodySetMaterialGroupID(
-		m_body, NewtonMaterialGetDefaultGroupID(m_world->_getNewtonWorld()));
+		m_body, NewtonMaterialGetDefaultGroupID(m_world->getNewtonWorld()));
 
 	// Players must have weight, otherwise they are infinitely strong when
 	// they collide
@@ -428,7 +428,7 @@ F32 PhysicsPlayerController::calculateContactKinematics(
 void PhysicsPlayerController::updateGroundPlane(
 	Mat4& matrix, const Mat4& castMatrix, const Vec4& dst, int threadIndex)
 {
-	NewtonWorld* world = m_world->_getNewtonWorld();
+	NewtonWorld* world = m_world->getNewtonWorld();
 
 	CustomControllerConvexRayFilter filter;
 	filter.m_me = m_body;
@@ -472,7 +472,7 @@ void PhysicsPlayerController::postUpdate(F32 dt, int threadIndex)
 	Vec4 veloc(0.0);
 	Vec4 omega(0.0);
 
-	NewtonWorld* world = m_world->_getNewtonWorld();
+	NewtonWorld* world = m_world->getNewtonWorld();
 
 	calculateVelocity(dt);
 

+ 1 - 1
src/renderer/Dbg.cpp

@@ -156,7 +156,7 @@ Error Dbg::run(RenderingContext& ctx)
 		PhysicsDebugDrawer phyd(m_drawer);
 
 		m_drawer->setModelMatrix(Mat4::getIdentity());
-		phyd.drawWorld(scene._getPhysicsWorld());
+		phyd.drawWorld(scene.getPhysicsWorld());
 	}
 
 #if 0

+ 1 - 1
src/resource/CollisionResource.cpp

@@ -29,7 +29,7 @@ Error CollisionResource::load(const ResourceFilename& filename)
 	XmlElement valEl;
 	ANKI_CHECK(collEl.getChildElement("value", valEl));
 
-	PhysicsWorld& physics = getManager()._getPhysicsWorld();
+	PhysicsWorld& physics = getManager().getPhysicsWorld();
 	PhysicsCollisionShapeInitInfo csInit;
 
 	if(type == "sphere")

+ 1 - 1
src/scene/BodyNode.cpp

@@ -69,7 +69,7 @@ Error BodyNode::init(const CString& name, const CString& resourceFname)
 	PhysicsBodyInitInfo init;
 	init.m_mass = 1.0;
 	init.m_shape = m_rsrc->getShape();
-	m_body = getSceneGraph()._getPhysicsWorld().newInstance<PhysicsBody>(init);
+	m_body = getSceneGraph().getPhysicsWorld().newInstance<PhysicsBody>(init);
 
 	// Body component
 	comp = getSceneAllocator().newInstance<BodyComponent>(this, m_body);

+ 1 - 1
src/scene/LensFlareComponent.cpp

@@ -26,7 +26,7 @@ LensFlareComponent::~LensFlareComponent()
 Error LensFlareComponent::init(const CString& textureFilename)
 {
 	// Texture
-	ANKI_CHECK(getSceneGraph()._getResourceManager().loadResource(
+	ANKI_CHECK(getSceneGraph().getResourceManager().loadResource(
 		textureFilename, m_tex));
 
 	// Queries

+ 1 - 1
src/scene/OccluderNode.cpp

@@ -58,7 +58,7 @@ Error OccluderNode::init(const CString& name, const CString& meshFname)
 	ANKI_CHECK(SceneNode::init(name));
 
 	// Load mesh
-	MeshLoader loader(&getSceneGraph()._getResourceManager());
+	MeshLoader loader(&getSceneGraph().getResourceManager());
 	ANKI_CHECK(loader.load(meshFname));
 
 	const U16* indices = reinterpret_cast<const U16*>(loader.getIndexData());

+ 1 - 1
src/scene/PlayerNode.cpp

@@ -145,7 +145,7 @@ Error PlayerNode::init(const CString& name, const Vec4& position)
 	PhysicsPlayerControllerInitInfo init;
 	init.m_position = position;
 	m_player =
-		getSceneGraph()._getPhysicsWorld().newInstance<PhysicsPlayerController>(
+		getSceneGraph().getPhysicsWorld().newInstance<PhysicsPlayerController>(
 			init);
 
 	SceneComponent* comp;

+ 1 - 1
src/scene/SceneGraph.cpp

@@ -163,7 +163,7 @@ Error SceneGraph::init(AllocAlignedCallback allocCb,
 	m_resources = resources;
 	m_objectsMarkedForDeletionCount.store(0);
 	m_gr = &m_resources->getGrManager();
-	m_physics = &m_resources->_getPhysicsWorld();
+	m_physics = &m_resources->getPhysicsWorld();
 	m_input = input;
 
 	m_alloc = SceneAllocator<U8>(allocCb, allocCbData, 1024 * 10, 1.0, 0);

+ 1 - 1
src/scene/SceneNode.cpp

@@ -131,7 +131,7 @@ void SceneNode::removeComponent(SceneComponent* comp)
 //==============================================================================
 ResourceManager& SceneNode::getResourceManager()
 {
-	return m_scene->_getResourceManager();
+	return m_scene->getResourceManager();
 }
 
 } // end namespace anki

+ 1 - 1
src/scene/Sector.cpp

@@ -91,7 +91,7 @@ Error PortalSectorBase::init(
 	addComponent(comp, true);
 
 	// Load mesh
-	MeshLoader loader(&getSceneGraph()._getResourceManager());
+	MeshLoader loader(&getSceneGraph().getResourceManager());
 	ANKI_CHECK(loader.load(meshFname));
 
 	// Convert Vec3 positions to Vec4

+ 1 - 1
src/scene/StaticCollisionNode.cpp

@@ -38,7 +38,7 @@ Error StaticCollisionNode::init(const CString& name,
 	init.m_static = true;
 	init.m_startTrf = transform;
 
-	m_body = getSceneGraph()._getPhysicsWorld().newInstance<PhysicsBody>(init);
+	m_body = getSceneGraph().getPhysicsWorld().newInstance<PhysicsBody>(init);
 
 	return ErrorCode::NONE;
 }