 |
Irrlicht 3D Engine
|
|
Go to the documentation of this file.
5 #ifndef __S_VIEW_FRUSTUM_H_INCLUDED__
6 #define __S_VIEW_FRUSTUM_H_INCLUDED__
114 enum E_TRANSFORMATION_STATE_FRUSTUM
138 for (i=0; i<ETS_COUNT_FRUSTUM; ++i)
139 Matrices[i]=other.Matrices[i];
298 planes[i].Normal.getLengthSQ());
316 index = SViewFrustum::ETS_PROJECTION;
break;
318 index = SViewFrustum::ETS_VIEW;
break;
322 return Matrices [ index ];
334 index = SViewFrustum::ETS_PROJECTION;
break;
336 index = SViewFrustum::ETS_VIEW;
break;
340 return Matrices [ index ];
346 bool wasClipped =
false;
E_TRANSFORMATION_STATE
enumeration for geometry transformation states
@ VF_PLANE_COUNT
Amount of planes enclosing the view frustum. Should be 6.
core::vector3df getFarRightUp() const
returns the point which is on the far right top corner inside the the view frustum.
vector3d< T > start
Start point of line.
void reset(T x, T y, T z)
Resets the bounding box to a one-point box.
core::vector3df getNearRightDown() const
returns the point which is on the near right bottom corner inside the the view frustum.
vector3d< T > getInterpolated(const vector3d< T > &other, f64 d) const
Creates an interpolated vector between this vector and another vector.
void transformPlane(core::plane3d< f32 > &plane) const
Transforms a plane by this matrix.
void setFrom(const core::matrix4 &mat)
This constructor creates a view frustum based on a projection and/or view matrix.
SViewFrustum()
Default Constructor.
vector3d< T > end
End point of line.
@ ETS_PROJECTION
Projection transformation.
bool getIntersectionWithPlanes(const plane3d< T > &o1, const plane3d< T > &o2, vector3d< T > &outPoint) const
Get the intersection point with two other planes if there is one.
core::vector3df getFarLeftDown() const
returns the point which is on the far left bottom corner inside the the view frustum.
core::vector3df getFarLeftUp() const
returns the point which is on the far left upper corner inside the the view frustum.
3D line between two points with intersection methods.
@ VF_RIGHT_PLANE
Right plane of the frustum.
void transformVect(vector3df &vect) const
Transforms the vector by this matrix.
T Y
Y coordinate of the vector.
4x4 matrix. Mostly used as transformation matrix for 3d calculations.
core::vector3df cameraPosition
the position of the camera
core::aabbox3d< f32 > boundingBox
bounding box around the view frustum
core::vector3df getNearLeftDown() const
returns the point which is on the near left bottom corner inside the the view frustum.
T Z
Z coordinate of the vector.
void transform(const core::matrix4 &mat)
transforms the frustum by the matrix
@ VF_NEAR_PLANE
Near plane of the frustum. That is the plane nearest to the eye.
float f32
32 bit floating point variable.
core::vector3df getNearLeftUp() const
returns the point which is on the near left upper corner inside the the view frustum.
core::vector3df getFarRightDown() const
returns the point which is on the far right bottom corner inside the the view frustum.
void recalculateBoundingBox()
recalculates the bounding box member based on the planes
core::matrix4 & getTransform(video::E_TRANSFORMATION_STATE state)
get the given state's matrix based on frustum E_TRANSFORMATION_STATE
@ VF_FAR_PLANE
Far plane of the frustum. That is the plane farest away from the eye.
Defines the view frustum. That's the space visible by the camera.
f32 getKnownIntersectionWithLine(const vector3d< T > &linePoint1, const vector3d< T > &linePoint2) const
Get percentage of line between two points where an intersection with this plane happens.
vector3d< T > Normal
Normal vector of the plane.
const core::aabbox3d< f32 > & getBoundingBox() const
returns a bounding box enclosing the whole view frustum
core::plane3d< f32 > planes[VF_PLANE_COUNT]
all planes enclosing the view frustum.
Everything in the Irrlicht Engine can be found in this namespace.
unsigned int u32
32 bit unsigned variable.
void addInternalPoint(const vector3d< T > &p)
Adds a point to the bounding box.
bool clipLine(core::line3d< f32 > &line) const
clips a line to the view frustum.
@ VF_BOTTOM_PLANE
Bottom plane of the frustum.
REALINLINE f64 reciprocal_squareroot(const f64 x)
@ VF_TOP_PLANE
Top plane of the frustum.
@ ETS_VIEW
View transformation.
@ VF_LEFT_PLANE
Left plane of the frustum.
core::vector3df getNearRightUp() const
returns the point which is on the near right top corner inside the the view frustum.
T X
X coordinate of the vector.