2
0
Daniele Bartolini 12 жил өмнө
parent
commit
d01f501289

+ 1 - 3
engine/physics/Raycast.cpp

@@ -35,11 +35,9 @@ namespace crown
 {
 
 //-------------------------------------------------------------------------
-Raycast::Raycast(PxScene* scene, EventStream& events, const char* callback, CollisionMode::Enum mode, CollisionType::Enum type)
+Raycast::Raycast(PxScene* scene, CollisionMode::Enum mode, CollisionType::Enum type)
 	: m_scene(scene)
 	, m_buffer(m_hits, CE_MAX_RAY_INTERSECTIONS)
-	, m_events(events)
-	, m_callback(callback)
 	, m_mode(mode)
 	, m_type(type)
 {

+ 3 - 6
engine/physics/Raycast.h

@@ -56,12 +56,13 @@ struct RaycastHit
 	Actor*					actor;
 };
 
+
 ///
 /// @ingroup Physics
 struct Raycast
 {
 	/// Constructor
-	Raycast(PxScene* scene, EventStream& events, const char* callback, CollisionMode::Enum mode, CollisionType::Enum type);
+	Raycast(PxScene* scene, CollisionMode::Enum mode, CollisionType::Enum type);
 
 	/// Performs a raycast against objects in the scene. The ray is casted from position @a from, has direction @a dir and is long @a length
 	/// If any actor is hit along the ray, @a EventStream is filled according to @a mode previously specified and callback will be called for processing.
@@ -79,13 +80,9 @@ struct Raycast
 private:
 
 	PxScene* 				m_scene;
-	PxRaycastHit 			m_hits[CE_MAX_RAY_INTERSECTIONS];	
+	PxRaycastHit 			m_hits[CE_MAX_RAY_INTERSECTIONS];
 	PxRaycastBuffer			m_buffer;
 	PxQueryFilterData 		m_fd;
-
-	EventStream&			m_events;
-	const char*				m_callback;
-
 	CollisionMode::Enum		m_mode;
 	CollisionType::Enum		m_type;
 };