Coneclass

A tapered shape between two points with a radius at each end. Supports cones and cylinders, with flat ends.

objectCone
Namespace
global
Assembly
Sandbox.System
Declaration
public sealed struct Cone

Constructors1

Showing 1 constructors

public Cone(Vector3 a, Vector3 b, float ra, float rb)PUBLICCONSTRUCTOR

A tapered shape between two points with a radius at each end. Supports cones and cylinders, with flat ends.

ParameterTypeDescription
aVector3
bVector3
rafloat
rbfloat

Methods2

Showing 2 methods

public bool Contains(Vector3 p)PUBLIC

Check if a point is inside.

ParameterTypeDescription
pVector3
Returns:bool

public float GetEdgeDistance(Vector3 p)PUBLIC

Distance from a point to the surface.

ParameterTypeDescription
pVector3
Returns:float

Properties3

Showing 3 properties

public BBox Cone.Bounds { get; set; }PUBLICGETSET

Bounding box that contains the shape.

Returns:BBox

public Vector3 Cone.RandomPointInside { get; set; }PUBLICGETSET

Get a random point inside.

Returns:Vector3

public Vector3 Cone.RandomPointOnEdge { get; set; }PUBLICGETSET

Get a random point on the surface.

Returns:Vector3

On this page