Last Updated 3/15/2000.
Types:
jeCamera;
This object represents a viewport into a jeWorld and is used to specify the view to be rendered.Constants:
Functions:
JETAPI jeCamera* JETCC jeCamera_Create(jeFloat FovRadians, const jeRect* Rect);
This function creates a new jeCamera object with a field-of-visions (in radians) of FovRadians and a rendering rectangle of Rect in screen coordinates.Returns: the newly created jeCamera object.
JETAPI void JETCC jeCamera_Destroy(jeCamera**
pCamera);
This function deletes jeCamera pCamera and frees all associated resources.Returns: nothing.
void jeCamera_FillDriverInfo(jeCamera*
Camera);
As far as I can tell, this function is not currently implemented.JETAPI void JETCC jeCamera_GetClippingRect(const jeCamera* Camera, jeRect* Rect);
This function returns the clipping rectangle for jeCamera Camera in Rect.Returns: nothing.
const jeVec3d* JETCC jeCamera_GetPov(const
jeCamera* Camera);
This function returns the current position of jeCamera Camera. I might be wrong about this. The use of the term Pov would seem to imply that this would be the "direction of view" of the camera, yet the value of jeCamera.Pov is always set as the translation part of the transpose transform of the camera. Am I misunderstanding something?JETAPI jeVec3d* JETCC jeCamera_GetPov2(jeCamera* Camera);Returns: the result.
This function returns the current position of jeCamera Camera. I might be wrong about this. The use of the term Pov would seem to imply that this would be the "direction of view" of the camera, yet the value of jeCamera.Pov is always set as the translation part of the transpose transform of the camera. Am I misunderstanding something?float JETCC jeCamera_GetScale(const jeCamera *Camera);Returns: the result.
This function returns the Scale of jeCamera Camera, which is the ratio of an increment in camera-space to an increment in screen space. I may have that backwards.JETAPI void JETCC jeCamera_GetTransposeXForm(const jeCamera* Camera, jeXForm3d* XForm);Returns: the result.
This function returns jeCamera Camera's transformation matrix.void JETCC jeCamera_GetViewAngleXSinCos(const jeCamera* Camera, jeFloat* SinAngle, jeFloat* CosAngle);Returns: nothing.
This function returns the Sin and Cos of the X angle of the view frustum of jeCamera Camera.void JETCC jeCamera_GetViewAngleYSinCos(const jeCamera* Camera, jeFloat* SinAngle, jeFloat* CosAngle);Returns: nothing.
This function returns the Sin and Cos of the Y angle of the view frustum of jeCamera Camera.void JETCC jeCamera_GetWidthHeight(const jeCamera* Camera, jeFloat* Width, jeFloat* Height);Returns: nothing.
This function returns the width and height of the viewport of jeCamera Camera in Width and Height respectively.JETAPI void JETCC jeCamera_GetXForm(const jeCamera* Camera, jeXForm3d* pXForm);Returns: nothing.
This function returns in jeXForm3d pXForm the current position and orientation of jeCamera Camera in worldspace coordinates.JETAPI jeFloat JETCC jeCamera_GetZScale(const jeCamera* Camera);Returns: nothing.
This function returns the Z scale settting for jeCamera Camera. As far as I can tell so far, this seems to affect Z-buffering. Decreasing the ZScale supposedly can help eliminate z-buffering problems on actor animations. I suspect it would degrade performance however.Returns: the result.
JETAPI jeBoolean JETCC jeCamera_PopXForm(jeCamera*
Camera);
This function pops the last transform pushed onto jeCamera Camera's internal transform stack by a call to _PushXForm and sets it as Camera's current transform.JETAPI void JETCC jeCamera_Project(const jeCamera* Camera, const jeVec3d* PointInCameraSpace, jeVec3d* ProjectedPoint);Returns: JE_TRUE on success, JE_FALSE otherwise.
This function projects the point PointInCameraSpace of jeCamera Camera into screen-space and returns the result in ProjectedPoint.Returns: nothing.
JETAPI void JETCC jeCamera_ProjectAndClamp(const
jeCamera* Camera, const jeVec3d* PointInCameraSpace, jeVec3d* ProjectedPoint);
This function projects the point PointInCameraSpace of jeCamera Camera into screen-space, clamping the result within the screen edges, and returns the result in ProjectedPoint.Returns: nothing.
JETAPI void JETCC jeCamera_ProjectAndClampArray(const
jeCamera* Camera, const jeVec3d* FmPoints, int32 FmStride, jeVec3d* ToPoints,
int32 ToStride, int32 Count);
This function projects an array of Count jeVec3d points in FmPoints with stride FmStride from camera-space to screen-space clamping the resulting points within the screen edges and storing the result in ToPoints with stride ToStride.JETAPI void JETCC jeCamera_ProjectAndClampL(const jeCamera* Camera, const jeLVertex* Point, jeTLVertex* ProjectedPoint);Returns: nothing.
This function projects the camera-space lit point of jeCamera Camera Point into a projected-space lit point, clamps the result within the screen edges and returns the result in ProjectedPoint. I'm not sure what the logic is in having separate definitions for jeLVertex and jeTLVertex. They appear to be completely interchangeable except for the capitalization of (x,y,z). I see now (3/13/2000) that there are some other things in jeLVertex that are currently commented out. Planned changes?JETAPI void JETCC jeCamera_ProjectAndClampLArray(const jeCamera* Camera, const jeLVertex* CameraSpacePointPtr, jeTLVertex* ProjectedSpacePointPtr, int32 Count);Returns: nothing.
This function projects an array of Count jeLVertex points in CameraSpacePointPtr from camera-space to projected-space clamping the resulting points within the screen edges and storing the result in jeTLVertex ProjectedSpacePointPtr. I'm not sure what the logic is in having separate definitions for jeLVertex and jeTLVertex. They appear to be completely interchangeable except for the capitalization of (x,y,z). I see now (3/13/2000) that there are some other things in jeLVertex that are currently commented out. Planned changes?JETAPI void JETCC jeCamera_ProjectArray(const jeCamera* Camera, const jeVec3d* FmPoints, int32 FmStride, jeVec3d* ToPoints, int32 ToStride, int32 Count);Returns: nothing.
This function projects an array of Count jeVec3d points in FmPoints with stride FmStride from camera-space to projected-space storing the result in ToPoints with stride ToStride.JETAPI void JETCC jeCamera_ProjectZ(const jeCamera* Camera, const jeVec3d* PointInCameraSpace, jeVec3d* ProjectedPoint);Returns: nothing.
This function projects the point PointInCameraSpace of jeCamera Camera into screen-space, returns the Z of the result as 1/Z, and returns the result in ProjectedPoint. I'm lost as to what the functionality of this is.JETAPI jeBoolean JETCC jeCamera_PushXForm(jeCamera* Camera);Returns: nothing.
This function pushes jeCamera Camera's current transform unto an internal stack, creating it if necessary. I assume that this is used to store transformations for some reason.JETAPI void JETCC jeCamera_ScreenPointToWorld(const jeCamera* Camera, int32 ScreenX, int32 ScreenY, jeVec3d* Vector);Returns: JE_TRUE on success, JE_FALSE otherwise.
This function converts a point in screen-space (X,Y,Z) for jeCamera Camera into a point in world-space and returns it in Vector.Returns: nothing.
JETAPI void JETCC jeCamera_SetAttributes(jeCamera*
Camera, jeFloat FovRadians, const jeRect* Rect);
This function sets the field-of-view FovRadians and screen rectangle Rect of jeCamera Camera.Returns: nothing.
JETAPI jeBoolean JETCC jeCamera_SetTransposeXForm(jeCamera*
Camera, const jeXForm3d* XForm);
This function sets jeCamera Camera's transform directly.JETAPI jeBoolean JETCC jeCamera_SetXForm(jeCamera* Camera, const jeXForm3d *XForm);Returns: JE_TRUE on success, JE_FALSE otherwise.
This function positions and orients the jeCamera Camera to the worldspace jeXForm3d XForm.JETAPI void JETCC jeCamera_SetZScale(jeCamera* Camera, jeFloat ZScale);Returns: JE_TRUE on success, JE_FALSE otherwise.
This function sets the Z scale setting for jeCamera Camera to ZScale. As far as I can tell so far, this seems to affect Z-buffering. Decreasing the ZScale supposedly can help eliminate z-buffering problems on actor animations. I suspect it would degrade performance however.Returns: nothing.
JETAPI void JETCC jeCamera_Transform(const
jeCamera* Camera, const jeVec3d* WorldSpacePoint, jeVec3d* CameraSpacePoint);
This function transforms world-space point WorldSpacePoint into a camera-space point for jeCamera Camera returning the result in CameraSpacePoint.Returns: nothing.
JETAPI
void JETCC jeCamera_TransformAndProject(const jeCamera* Camera, const jeVec3d*
Point, jeVec3d* ProjectedPoint);
This function transforms world-space point Point into a projected-space point for geCamera Camera returning the result in ProjectedPoint. Projected-space is a right-handed space relative to the jeCamera with +X to the 'right', +Y in the camera 'up' direction, and +Z in the camera 'in' direction. (I may have the definition of +Z reversed here.)Returns: nothing.
JETAPI void JETCC jeCamera_TransformAndProjectAndClampArray(const
jeCamera* Camera, const jeVec3d* WorldSpacePointPtr, int32 WorldStride,
jeVec3d* ProjectedSpacePointPtr, int32 ProjectedStride, int32 Count);
This function transforms an array of Count world-space points in the array at WorldSpacePointPtr into projected-space points for jeCamera Camera, clamping the resulting points within the screen edges, and returning the result in an array at ProjectedSpacePointPtr.I don't really get the WorldStride and ProjectedStride args so I don't think I'll even attempt an explanation yet.Returns: nothing.
JETAPI void JETCC jeCamera_TransformAndProjectAndClamp(const
jeCamera* Camera, const jeVec3d* Point, jeVec3d* ProjectedPoint);
This function transforms the world-space point Point into a projected-space point for jeCamera Camera, returning the result in ProjectedPoint.JETAPI void JETCC jeCamera_TransformAndProjectAndClampL(const jeCamera* Camera, const jeLVertex* Point, jeTLVertex* ProjectedPoint);Returns: nothing.
This function transform a world-space lit point Point into a projected-space lit point, clamps it within the screen edges, and returns the result in ProjectedPoint. I'm not sure what the logic is in having separate definitions for jeLVertex and jeTLVertex. They appear to be completely interchangeable except for the capitalization of (x,y,z). I see now (3/13/2000) that there are some other things in jeLVertex that are currently commented out. Planned changes?JETAPI void JETCC jeCamera_TransformAndProjectAndClampLArray(const jeCamera* Camera, const jeLVertex* WorldSpacePointPtr, jeTLVertex* ProjectedSpacePointPtr, int32 Count);Returns: nothing.
This function transforms an array of Count world-space lit points in the array at WorldSpacePointPtr into an array of projected-space lit points for jeCamera Camera, clamps the results to the screen edges, returning the result in jeTLVertex array ProjectedSpacePointPtr. I'm not sure what the logic is in having separate definitions for jeLVertex and jeTLVertex. They appear to be completely interchangeable except for the capitalization of (x,y,z). I see now (3/13/2000) that there are some other things in jeLVertex that are currently commented out. Planned changes?Returns: nothing.
JETAPI void JETCC jeCamera_TransformAndProjectArray(const
jeCamera* Camera, const jeVec3d* WorldSpacePointPtr, int32 WorldStride,
jeVec3d* ProjectedSpacePointPtr, int32 ProjectedStride, int Count);
This function transforms an array of Count world-space points in the array at WorldSpacePointPtr into projected-space points for jeCamera Camera returning the result in an array at ProjectedSpacePointPtr. See jeCamera_TransformAndProject for more details. I don't really get the WorldStride and ProjectedStride args so I don't think I'll even attempt an explanation yet.Returns: nothing.
JETAPI void JETCC jeCamera_TransformAndProjectL(const
jeCamera* Camera, const jeLVertex* Point, jeTLVertex* ProjectedPoint);
This function transforms a world-space lit point Point into a projected-space lit point for jeCamera Camera returning the result in jeTLVertex ProjectedPoint. I'm not sure what the logic is in having separate definitions for jeLVertex and jeTLVertex. They appear to be completely interchangeable except for the capitalization of (x,y,z). I see now (3/13/2000) that there are some other things in jeLVertex that are currently commented out. Planned changes?Returns: nothing.
JETAPI void JETCC jeCamera_TransformAndProjectLArray(const
jeCamera* Camera, const jeLVertex* WorldSpacePointPtr, jeTLVertex* ProjectedSpacePointPtr,
int32 Count);
This function transforms an array of Count world-space lit points in the array at WorldSpacePointPtr into an array of projected-space lit points for jeCamera Camera returning the result in jeTLVertex array ProjectedSpacePointPtr. I'm not sure what the logic is in having separate definitions for jeLVertex and jeTLVertex. They appear to be completely interchangeable except for the capitalization of (x,y,z). I see now (3/13/2000) that there are some other things in jeLVertex that are currently commented out. Planned changes?Returns: nothing.
JETAPI void JETCC jeCamera_TransformAndProjectVecArray(const
jeCamera* Camera, const jeVec3d* WorldSpacePointPtr, jeVec3d* ProjectedSpacePointPtr,
int32 Count);
This function transforms an array of Count world-space points in the array at WorldSpacePointPtr into projected-space points for jeCamera Camera returning the result in an array at ProjectedSpacePointPtr. See jeCamera_TransformAndProject for more details.Returns: nothing.
JETAPI void JETCC jeCamera_TransformL(const
jeCamera* Camera, const jeLVertex* Point, jeTLVertex* ProjectedPoint);
This function transforms the world-space lit point Point into a camera-space lit point of jeCamera Camera returning the result in ProjectedPoint. I'm not sure what the logic is in having separate definitions for jeLVertex and jeTLVertex. They appear to be completely interchangeable except for the capitalization of (x,y,z). I see now (3/13/2000) that there are some other things in jeLVertex that are currently commented out. Planned changes?JETAPI void JETCC jeCamera_TransformLArray(const jeCamera* Camera, const jeLVertex* WorldSpacePointPtr, jeLVertex* CameraSpacePointPtr, int32 Count);Returns: nothing.
This function transforms an array of Count jeLVertex World-space lit points into camera-space lit points of jeCamera camera returning the results in CameraSpacePointPtr. I'm not sure what the logic is in having separate definitions for jeLVertex and jeTLVertex. They appear to be completely interchangeable except for the capitalization of (x,y,z). I see now (3/13/2000) that there are some other things in jeLVertex that are currently commented out. Planned changes?JETAPI void JETCC jeCamera_TransformVecArray(const jeCamera* Camera, const jeVec3d* WorldSpacePointPtr, jeVec3d* CameraSpacePointPtr, int32 Count);Returns: nothing.
This function transforms an array of Count world-space points in array WorldSpacePointPtr into an array of camera-space points for gjCamera Camera returning the result in CameraSpacePointPtr.Returns: nothing.
const jeXForm3d* JETCC jeCamera_WorldXForm(const
jeCamera* Camera);
This function returns the position and orientation of jeCamera Camera.const jeXForm3d* JETCC jeCamera_XForm(const jeCamera* Camera);Returns: the result.
This function returns a pointer to the current transform for jeCamera Camera.Returns: the current tranform.