Structs:SecPlane
Jump to navigation
Jump to search
Note: This feature is for ZScript only. |
SecPlanes store information about the floor and ceiling planes that make up a sector. Each sector comes with two pointers, ceilingplane and floorplane. 3D floors instead use bottom and top to store their plane data respectively. When getting information about z heights at positions or slope data, SecPlanes must be used.
Warning: SecPlanes are not serializable, meaning references to them cannot be saved in a save file. If you need to store them as a member variable in a class or struct, make sure said variable is defined as transient
and gets updated when loading a save.
Fields
- Vector3 Normal - A unit vector that is perpendicular to the plane.
- double D - Contains the plane's distance from the world origin. See the general form of a plane for more information.
- double negiC - The same as -1 / Normal.z. Pre-computed to speed up certain tasks such as calculating the z height at an xy point on a plane.
Methods
Non-static
- bool isSlope()
- int PointOnSide(Vector3 pos)
- double ZatPoint(Vector2 v)
- double ZatPointDist(Vector2 v, double dist)
- bool isEqual(SecPlane other)
- double GetChangedHeight(double hdiff)
- double HeightDiff(double oldd, double newd = 1e37)
- double PointToDist(Vector2 xy, double z)