s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
PolygonMesh
chevron_left
Classes
class
PolygonMesh
search
Constructors
functions
PolygonMesh
Properties
data_object
FaceHandles
data_object
HalfEdgeHandles
data_object
IsDirty
data_object
Transform
data_object
VertexHandles
Methods
functions
AddFace
functions
AddVertex
functions
AddVertexToEdge
functions
AddVertexToEdgeAndUpdateTable
functions
AddVertices
functions
ApplyTransform
functions
AreEdgesCoLinear
functions
AverageEdgeUVs
functions
AverageVertexUVs
functions
BevelEdges
functions
BevelVertices
functions
BridgeEdges
functions
BridgeEdgesInterpolated
functions
CalculateBounds
functions
ClassifyEdgeListConnectivity
functions
ClipFacesByPlaneAndCap
functions
CollapseEdge
functions
CollapseEdges
functions
CollapseFace
functions
CombineFaces
functions
ComputeClosestPointOnEdge
functions
ComputeFaceNormal
functions
ComputeFaceTextureCoordinatesFromParameters
functions
ComputeFaceTextureParametersFromCoordinates
functions
ComputeNormalForOpenEdgeLoop
functions
ComputeOpenEdgeExtendDirection
functions
ConnectEdges
functions
ConnectVertices
functions
CorrelateOpenEdges
functions
CreateEdgesConnectingVertexToPoint
functions
CreateFace
functions
CreateFaceInEdgeLoop
functions
DetachFaces
functions
DissolveEdge
functions
DissolveEdges
functions
ExtendEdges
functions
ExtendOrExtrudeVertices
functions
ExtrudeFaces
functions
FaceHandleFromIndex
functions
FindBoundaryEdgesConnectedToFaces
functions
FindClosedFaces
functions
FindCornerVerticesForFace
functions
FindEdgeConnectingVertices
functions
FindEdgeIslands
functions
FindEdgeLoopForEdges
functions
FindEdgeRibs
functions
FindEdgeRing
functions
FindFaceIslands
functions
FindFaceVertexConnectedToVertex
functions
FindHalfEdgesConnectedToFace
functions
FindOpenEdgeIslands
functions
FindVerticesConnectedToEdges
functions
FlipAllFaces
functions
GenerateUVsForFaces
functions
GetEdgeLine
functions
GetEdges
functions
GetEdgesConnectedToFace
functions
GetEdgesConnectedToVertex
functions
GetEdgeSmoothing
functions
GetEdgeVertexPositions
functions
GetEdgeVertices
functions
GetFaceCenter
functions
GetFaceEdges
functions
GetFaceMaterial
functions
GetFacePlaneUsingEdge
functions
GetFacesConnectedToEdge
functions
GetFacesConnectedToFace
functions
GetFacesConnectedToVertex
functions
GetFaceTextureCoords
functions
GetFaceTextureParameters
functions
GetFaceVertexPositions
functions
GetFaceVertices
functions
GetFaceVerticesConnectedToFace
functions
GetFaceVerticesConnectedToVertex
functions
GetHalfEdgeFace
functions
GetNextVertexInFace
functions
GetOppositeFaceConnectedToEdge
functions
GetOppositeHalfEdge
functions
GetTextureCoord
functions
GetTextureOffset
functions
GetTextureScale
functions
GetVertexBlend
functions
GetVertexColor
functions
GetVertexConnectedToFaceVertex
functions
GetVertexPosition
functions
GetVertexPositions
functions
GetVerticesConnectedToEdge
functions
GetVerticesConnectedToFace
functions
HalfEdgeHandleFromIndex
functions
IsEdgeOpen
functions
IsEdgeSmooth
functions
JustifyFaceTextureParameters
functions
MergeEdges
functions
MergeMesh
functions
MergeVerticesWithinDistance
functions
PerformBoolean
functions
QuadSliceFaces
functions
Rebuild
functions
RemoveBadFaces
functions
RemoveColinearVertexAndUpdateTable
functions
RemoveEdges
functions
RemoveFaces
functions
RemoveVertex
functions
RemoveVertices
functions
Scale
functions
SetEdgeSmoothing
functions
SetFaceMaterial
functions
SetFaceTextureCoords
functions
SetFaceTextureParameters
functions
SetSmoothingAngle
functions
SetTextureCoord
functions
SetTextureOffset
functions
SetTextureScale
functions
SetTransform
functions
SetVertexBlend
functions
SetVertexColor
functions
SetVertexPosition
functions
SplitEdges
functions
SplitFacesIntoIslandsForUVMapping
functions
TextureAlignToFace
functions
TextureAlignToGrid
functions
ThickenFaces
functions
TriangleToFace
functions
UnionExtentsForFaces
functions
VertexHandleFromIndex
Static Methods
functions
GetBestPlanesForEdgeBetweenFaces
functions
GetNearestEdgesBetweenFaces
functions
GetTextureExtents
functions
JsonRead
functions
JsonWrite
PolygonMesh
An editable mesh made up of polygons, triangulated into a model
class
Sandbox
.
sealed
Sandbox.Engine
build
Constructors
1
PolygonMesh
(
)
data_object
Properties
5
FaceHandles
IEnumerable`1
All of the face handles being used
HalfEdgeHandles
IEnumerable`1
All of the half edge handles being used
IsDirty
bool
Has there been changes to the mesh that need rebuilding?
Transform
Transform
Where is the mesh in worldspace.
VertexHandles
IEnumerable`1
All of the vertex handles being used
functions
Methods
125
AddFace
(
hVertices
)
FaceHandle
Connect these vertices to make a face
AddVertex
(
position
)
VertexHandle
Add a vertex to the topology
AddVertexToEdge
(
hVertexA
,
hVertexB
,
flParam
,
pOutNewVertex
)
bool
AddVertexToEdgeAndUpdateTable
(
hVertexA
,
hVertexB
,
flParam
,
pNewVertex
,
pEdgeTable
)
bool
AddVertices
(
positions
)
VertexHandle[]
Add multiple vertices to the topology
ApplyTransform
(
transform
)
Transform all the vertices
AreEdgesCoLinear
(
hEdgeA
,
hEdgeB
,
flAngleToleranceInDegrees
)
bool
AverageEdgeUVs
(
edges
)
AverageVertexUVs
(
vertices
)
BevelEdges
(
edges
,
edgeRemoveMode
,
numSegments
,
distance
,
shape
,
outNewOuterEdges
,
outNewInnerEdges
,
outNewFaces
,
outFacesNeedingUVs
)
bool
BevelVertices
(
vertices
,
distance
,
newVertices
)
bool
BridgeEdges
(
hEdgeA
,
hEdgeB
,
hOutNewFace
)
bool
Bridge two edges (create a face connecting them). The edges must both be open and belong to different faces.
BridgeEdgesInterpolated
(
fromEdges
,
toEdges
,
parameters
,
outEdgesCreated
)
bool
CalculateBounds
(
)
BBox
Calculate bounds of all vertices
ClassifyEdgeListConnectivity
(
edgeList
,
outSortedEdges
)
ComponentConnectivityType
ClipFacesByPlaneAndCap
(
faces
,
planeInMeshSpace
,
removeFacesBehindPlane
,
attemptToCap
,
outNewEdges
,
outCapFaces
)
CollapseEdge
(
hEdge
,
pOutNewVertex
,
pOutReplacedEdges
)
bool
CollapseEdges
(
edges
)
CollapseFace
(
hFace
,
hOutVertex
)
bool
CombineFaces
(
faces
)
ComputeClosestPointOnEdge
(
hVertexA
,
hVertexB
,
vTargetPoint
,
pOutBaseEdgeParam
)
bool
ComputeFaceNormal
(
hFace
,
pOutNormal
)
ComputeFaceTextureCoordinatesFromParameters
(
)
ComputeFaceTextureParametersFromCoordinates
(
)
ComputeNormalForOpenEdgeLoop
(
edges
,
outNormal
,
outMidPoint
)
bool
ComputeOpenEdgeExtendDirection
(
edge
)
Vector3
ConnectEdges
(
edges
,
newEdges
)
bool
ConnectVertices
(
hVertexA
,
hVertexB
,
hNewEdge
)
bool
CorrelateOpenEdges
(
edgeSetA
,
edgeSetB
,
outA
,
outB
)
bool
CreateEdgesConnectingVertexToPoint
(
hStartVertex
,
vTargetPosition
,
pOutEdgeList
,
pOutIsLastEdgeConnector
,
pEdgeTable
)
VertexHandle
CreateFace
(
hFace
,
transform
,
color
)
Vertex[]
CreateFaceInEdgeLoop
(
hOpenEdge
,
hNewFace
)
bool
Add a face filling in the open edge loop specified by the provided edge
DetachFaces
(
faces
,
newFaces
)
DissolveEdge
(
edge
)
DissolveEdges
(
edges
,
bFaceMustBePlanar
,
removeCondition
)
ExtendEdges
(
edges
,
amount
,
newEdges
,
newFaces
)
bool
ExtendOrExtrudeVertices
(
vertices
,
offset
,
baseWidth
,
modifiedVertices
,
originalVertices
,
newFaces
)
bool
ExtrudeFaces
(
faces
,
newFaces
,
connectingFaces
,
offset
)
FaceHandleFromIndex
(
index
)
FaceHandle
FindBoundaryEdgesConnectedToFaces
(
faces
,
outBoundaryEdges
)
FindClosedFaces
(
faceList
,
outClosedFaces
)
FindCornerVerticesForFace
(
hFace
,
minCornerAngle
,
outCornerVertices
)
FindEdgeConnectingVertices
(
hVertexA
,
hVertexB
)
HalfEdgeHandle
FindEdgeIslands
(
edgeList
,
outEdgeList
)
FindEdgeLoopForEdges
(
originalEdges
,
pOutEdgeLoopEdges
)
FindEdgeRibs
(
edges
,
outLeftRibs
,
outRightRibs
)
int
FindEdgeRing
(
hEdge
,
outEdgeList
)
FindFaceIslands
(
faces
,
outFaces
)
FindFaceVertexConnectedToVertex
(
hVertex
,
hFace
)
HalfEdgeHandle
FindHalfEdgesConnectedToFace
(
face
,
halfEdges
)
bool
FindOpenEdgeIslands
(
edgeList
,
outEdgeIslands
)
FindVerticesConnectedToEdges
(
edgeList
,
outVertices
)
FlipAllFaces
(
)
GenerateUVsForFaces
(
faces
,
generationMode
,
edgeAlignMode
,
alignEdgeVertexA
,
alignEdgeVertexB
,
outFaceVertices
,
outFaceVertexUVs
)
GetEdgeLine
(
hEdge
)
Line
Get start and end points of an edge
GetEdges
(
)
IEnumerable`1
Get the start and end points of all edges
GetEdgesConnectedToFace
(
hFace
,
edges
)
bool
GetEdgesConnectedToVertex
(
hVertex
,
edges
)
bool
GetEdgeSmoothing
(
hEdge
)
EdgeSmoothMode
Get the smoothing of this edge
GetEdgeVertexPositions
(
hEdge
,
transform
,
outVertexA
,
outVertexB
)
GetEdgeVertices
(
hEdge
,
hVertexA
,
hVertexB
)
Get the two vertices of this half edge
GetFaceCenter
(
hFace
)
Vector3
Calculate the center point of a face
GetFaceEdges
(
hFace
)
HalfEdgeHandle[]
Get all edge handles of a face
GetFaceMaterial
(
hFace
)
Material
Get a material a face is using
GetFacePlaneUsingEdge
(
hFace
,
hEdge
,
transform
,
outPlane
)
GetFacesConnectedToEdge
(
hEdge
,
hOutFaceA
,
hOutFaceB
)
GetFacesConnectedToFace
(
hFace
,
faces
)
bool
GetFacesConnectedToVertex
(
hVertex
,
faces
)
bool
GetFaceTextureCoords
(
hFace
)
Vector2[]
GetFaceTextureParameters
(
hFace
,
outAxisU
,
outAxisV
,
outScale
)
GetFaceVertexPositions
(
hFace
,
transform
)
IEnumerable`1
GetFaceVertices
(
hFace
)
VertexHandle[]
Get all vertex handles of a face
GetFaceVerticesConnectedToFace
(
hFace
,
hEdges
)
bool
GetFaceVerticesConnectedToVertex
(
hVertex
,
faceVertices
)
bool
GetHalfEdgeFace
(
hEdge
)
FaceHandle
Get the face connected to this half edge
GetNextVertexInFace
(
hFaceVertex
)
HalfEdgeHandle
GetOppositeFaceConnectedToEdge
(
hEdge
,
hFace
)
FaceHandle
GetOppositeHalfEdge
(
hEdge
)
HalfEdgeHandle
GetTextureCoord
(
faceVertex
)
Vector2
Get face vertex texture coord
GetTextureOffset
(
hFace
)
Vector2
Get texture offset of a face
GetTextureScale
(
hFace
)
Vector2
Get texture scale of a face
GetVertexBlend
(
hFaceVertex
)
Color32
Get the blend of a vertex
GetVertexColor
(
hFaceVertex
)
Color32
Get the color of a vertex
GetVertexConnectedToFaceVertex
(
hFaceVertex
)
VertexHandle
GetVertexPosition
(
hVertex
)
Vector3
Get the position of a vertex
GetVertexPositions
(
)
IEnumerable`1
Get the positions of all vertices
GetVerticesConnectedToEdge
(
hEdge
,
hFace
,
hOutVertexA
,
hOutVertexB
)
bool
GetVerticesConnectedToFace
(
hFace
,
vertices
)
bool
HalfEdgeHandleFromIndex
(
index
)
HalfEdgeHandle
IsEdgeOpen
(
hEdge
)
bool
Determine if the specified edge is open (only has one connected face)
IsEdgeSmooth
(
hEdge
)
bool
JustifyFaceTextureParameters
(
hFaces
,
justification
,
extents
)
MergeEdges
(
hEdgeA
,
hEdgeB
,
hOutNewEdge
)
bool
MergeMesh
(
sourceMesh
,
transform
,
newVertices
,
newHalfEdges
,
newFaces
)
MergeVerticesWithinDistance
(
originalVertices
,
flMaxDistance
,
bPreConnect
,
bAveragePositions
,
pOutFinalVertices
)
int
PerformBoolean
(
other
,
relativeTransform
,
operation
)
bool
Perform a boolean operation between this mesh (A) and another mesh (B). The result replaces this mesh. The other mesh is not modified.
QuadSliceFaces
(
faces
,
cutsX
,
cutsY
,
minCornerAngleDegrees
,
outNewFaceList
)
Rebuild
(
)
Model
Triangulate the polygons into a model
RemoveBadFaces
(
)
RemoveColinearVertexAndUpdateTable
(
hVertex
,
edgeTable
,
flColinearAngleTolerance
)
bool
RemoveEdges
(
hEdges
)
RemoveFaces
(
hFaces
)
RemoveVertex
(
hVertex
,
removeFreeVerts
)
bool
RemoveVertices
(
hVertices
)
Scale
(
scale
)
Scale all vertices
SetEdgeSmoothing
(
hEdge
,
mode
)
Set the smoothing of this edge
SetFaceMaterial
(
hFace
,
material
)
Assign a material to a face
SetFaceTextureCoords
(
hFace
,
texcoords
)
SetFaceTextureParameters
(
hFace
,
offset
,
uAxis
,
vAxis
)
Set face texture properties
SetSmoothingAngle
(
smoothingAngle
)
SetTextureCoord
(
faceVertex
,
texcoord
)
Set face vertex texture coord
SetTextureOffset
(
hFace
,
offset
)
Set texture offset of a face
SetTextureScale
(
hFace
,
scale
)
Set texture scale of a face
SetTransform
(
transform
)
Set transform without computing texture parameters from coordinates.
SetVertexBlend
(
hFaceVertex
,
blend
)
Set the blend of a vertex
SetVertexColor
(
hFaceVertex
,
color
)
Set the color of a vertex
SetVertexPosition
(
hVertex
,
position
)
Set the position of a vertex
SplitEdges
(
edges
,
newEdgesA
,
pOutNewEdgesB
)
bool
SplitFacesIntoIslandsForUVMapping
(
faces
,
faceIslands
)
TextureAlignToFace
(
transform
,
hFace
)
Align face texture properties to face
TextureAlignToGrid
(
transform
,
hFace
)
Align face texture properties to grid
ThickenFaces
(
faces
,
amount
,
outFaces
)
bool
TriangleToFace
(
triangle
)
FaceHandle
Convert a triangle index to a face handle
UnionExtentsForFaces
(
hFaces
,
transform
,
extents
)
VertexHandleFromIndex
(
index
)
VertexHandle
functions
Static Methods
5
GetBestPlanesForEdgeBetweenFaces
(
pMesh1
,
hFace1
,
mLocalToWorld1
,
pMesh2
,
hFace2
,
mLocalToWorld2
,
pOutPlane1
,
pOutPlane2
)
GetNearestEdgesBetweenFaces
(
pMesh1
,
hFace1
,
mLocalToWorld1
,
pMesh2
,
hFace2
,
mLocalToWorld2
,
pOutEdge1
,
pOutEdge2
)
bool
GetTextureExtents
(
vAxisU
,
vAxisV
,
vScale
,
extents
,
topLeft
,
bottomRight
)
JsonRead
(
reader
,
typeToConvert
)
object
JsonWrite
(
value
,
writer
)
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.