فهرست منبع

Make the members public and initialize projection type to PERSPECTIVE

Daniele Bartolini 12 سال پیش
والد
کامیت
8645e96b7a
2فایلهای تغییر یافته به همراه5 افزوده شده و 2 حذف شده
  1. 3 0
      engine/Camera.cpp
  2. 2 2
      engine/Camera.h

+ 3 - 0
engine/Camera.cpp

@@ -39,6 +39,9 @@ void Camera::create(Unit& parent, int32_t node)
 {
 	m_parent = &parent;
 	m_node = node;
+	m_projection_type = ProjectionType::PERSPECTIVE;
+
+	update_projection_matrix();
 }
 
 //-----------------------------------------------------------------------

+ 2 - 2
engine/Camera.h

@@ -78,12 +78,12 @@ struct Camera
 	float			far_clip_distance() const;
 	void			set_far_clip_distance(float far);
 
-private:
+public:
 
 	void			update_projection_matrix();
 	void			update_frustum();
 
-private:
+public:
 
 	Unit*					m_parent;
 	int32_t					m_node;