Object TRayCollisionNode

Methods
Properties

Unit

Declaration

type TRayCollisionNode = object(TObject)

Description

Information about ray collision with a single 3D object. Everything (Point, RayOrigin, RayDirection) is expressed in the parent coordinate system of this TCastleTransform (in Item).

Hierarchy

  • TObject
  • TRayCollisionNode

Overview

Fields

Public Item: TCastleTransform;
Public Point: TVector3;
Public Triangle: PTriangle;
Public RayOrigin: TVector3;
Public RayDirection: TVector3;

Description

Fields

Public Item: TCastleTransform;

Colliding object.

Public Point: TVector3;

Position, in local coordinate system of this 3D object, of the picked 3D point.

If the ray hit empty space (Triangle field is Nil), then this is undefined. Such case may occur because, once TCastleTransform handles TCastleTransform.PointingDevicePress, we make sure to inform it about PointingDeviceMove and PointingDeviceRelease, regardless if ray still hits this TCastleTransform instance.

Public Triangle: PTriangle;

Triangle that was hit. This triangle is always a part of Item.

If the ray hit empty space then this is Nil. Such case may occur because, once TCastleTransform handles TCastleTransform.PointingDevicePress, we make sure to inform it about PointingDeviceMove and PointingDeviceRelease, regardless if ray still hits this TCastleTransform instance.

May also be Nil if RayCollision implementation for the 3D object simply left it Nil. For example,

Public RayOrigin: TVector3;

Ray used to cause the collision, in the parent coordinate system of this TCastleTransform. RayDirection is not necessarily normalized!

Public RayDirection: TVector3;

Ray used to cause the collision, in the parent coordinate system of this TCastleTransform. RayDirection is not necessarily normalized!


Generated by PasDoc 0.16.0.