EditableMeshクラス

クラスInstance.newでは作れない日本語解説は準備中

ひとことで言うと

EditableMeshは、ロブロックス(Roblox)のクラスです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。

公式の説明(英語):Object which allows for the runtime creation and manipulation of meshes.

クラスの関係

受け継いでいるクラス:Object → EditableMesh

プロパティ(1)

名前と書き方説明
FixedSize
EditableMesh.FixedSize: boolean
Returns true if a mesh is fixed-size.

メソッド(93)

名前と書き方説明
AddBone
EditableMesh:AddBone(boneProperties: Dictionary): int64
Adds a new bone and returns a bone ID.
AddColor
EditableMesh:AddColor(color: Color3, alpha: float): int64
Adds a new color to the geometry and returns a color ID.
AddFace
EditableMesh:AddFace(vertexIds: Tuple): int64
Adds a new triangle or quad face to the mesh and returns a face ID.
AddNormal
EditableMesh:AddNormal(normal: Vector3?): int64
Adds a new normal to the geometry and returns a normal ID.
AddTriangle
EditableMesh:AddTriangle(vertexId0: int64, vertexId1: int64, vertexId2: int64): int64
Adds a new triangle to the mesh and returns a face ID.
AddUV
EditableMesh:AddUV(uv: Vector2): int64
Adds a new UV to the geometry and returns a UV ID.
AddVertex
EditableMesh:AddVertex(p: Vector3): int64
Adds a new vertex to the geometry and returns a vertex ID.
BatchAdd
EditableMesh:BatchAdd(attr: MeshAttribute, data: Array): Array
Creates new mesh elements of the given attribute type and returns their IDs.
BatchGetFaceAttributes
EditableMesh:BatchGetFaceAttributes(attr: MeshAttribute, faceIds: Array): Array
Returns the per-corner attribute IDs for each face in a batch.
BatchGetValues
EditableMesh:BatchGetValues(ids: Array): Tuple
Returns attribute values for each ID in a batch.
BatchGetVertexAttributes
EditableMesh:BatchGetVertexAttributes(attr: MeshAttribute, vertexIds: Array): Array
Returns the attribute IDs associated with each vertex in a batch.
BatchGetVertexFaceAttributes
EditableMesh:BatchGetVertexFaceAttributes(attr: MeshAttribute, vertexIds: Array, faceIds: Array): Array
Returns the attribute ID at each specified corner for a batch of vertex–face pairs.
BatchRemove
EditableMesh:BatchRemove(faceIds: Array): ()
Removes a batch of faces.
BatchSetFaceAttributes
EditableMesh:BatchSetFaceAttributes(faceIds: Array, attrIdArrays: Array): ()
Sets the per-corner attribute IDs for each face in a batch.
BatchSetValues
EditableMesh:BatchSetValues(ids: Array, values: Array): ()
Writes attribute values to a batch of mesh element IDs.
BatchSetVertexFaceAttributes
EditableMesh:BatchSetVertexFaceAttributes(vertexIds: Array, faceIds: Array, attrIds: Array): ()
Sets the attribute at a specific corner for each vertex–face pair in a batch.
Clear
EditableMesh:Clear(): ()
Clears all of an EditableMesh's geometry.
Destroy
EditableMesh:Destroy(): ()
Destroys the mesh.
FindClosestPointOnSurface
EditableMesh:FindClosestPointOnSurface(point: Vector3): Tuple
Finds the closest point on the mesh's surface.
FindClosestVertex
EditableMesh:FindClosestVertex(toThisPoint: Vector3): int64
Finds the closest vertex to a specific point in space.
FindVerticesWithinSphere
EditableMesh:FindVerticesWithinSphere(center: Vector3, radius: float): Array
Finds all vertices within a specific sphere.
GetAdjacentFaces
EditableMesh:GetAdjacentFaces(faceId: int64): Array
Returns a list of faces adjacent to a given face.
GetAdjacentVertices
EditableMesh:GetAdjacentVertices(vertexId: int64): Array
Returns a list of vertices adjacent to a given vertex.
GetBoneByName
EditableMesh:GetBoneByName(boneName: string): int64
Finds the bone ID of the bone with the given name.
GetBoneCFrame
EditableMesh:GetBoneCFrame(boneId: int64): CFrame
Returns the initial CFrame of the bone in the bind pose of the mesh.
GetBoneIsVirtual
EditableMesh:GetBoneIsVirtual(boneId: int64): boolean
Returns true if the bone is virtual.
GetBoneName
EditableMesh:GetBoneName(boneId: int64): string
Returns the bone name.
GetBoneParent
EditableMesh:GetBoneParent(boneId: int64): int64
Returns the parent bone ID, if any.
GetBones
EditableMesh:GetBones(): Array
Returns all bones of the mesh.
GetCenter
EditableMesh:GetCenter(): Vector3
Returns the center of the mesh's axis-aligned bounding box.
GetColor
EditableMesh:GetColor(colorId: int64): Color3?
Returns the color for the given color ID.
GetColorAlpha
EditableMesh:GetColorAlpha(colorId: int64): float?
Returns the color alpha (transparency) at the given color ID.
GetColors
EditableMesh:GetColors(): Array
Returns all colors of the mesh.
GetFaceColors
EditableMesh:GetFaceColors(faceId: int64): Array
Returns the face's color IDs for the vertices on the face.
GetFaceNormals
EditableMesh:GetFaceNormals(faceId: int64): Array
Returns the face's normal IDs for the vertices on the face.
GetFaces
EditableMesh:GetFaces(): Array
Returns all faces of the mesh.
GetFacesWithColor
EditableMesh:GetFacesWithColor(colorId: int64): Array
Returns an array of face IDs that use the given color ID.
GetFacesWithNormal
EditableMesh:GetFacesWithNormal(normalId: int64): Array
Returns an array of face IDs that use the given normal ID.
GetFacesWithUV
EditableMesh:GetFacesWithUV(uvId: int64): Array
Returns an array of face IDs that use the given UV ID.
GetFaceUVs
EditableMesh:GetFaceUVs(faceId: int64): Array
Returns the face's UV IDs for the vertices on the face.
GetFaceVertices
EditableMesh:GetFaceVertices(faceId: int64): Array
Returns the face's vertex IDs.
GetFacsCorrectivePose
EditableMesh:GetFacsCorrectivePose(actions: Array): Tuple
Returns bone IDs and bone Datatype.CFrame|CFrames for all bones in a specific FACS corrective pose.
GetFacsCorrectivePoses
EditableMesh:GetFacsCorrectivePoses(): Array
Returns all FACS corrective poses that are in use.
GetFacsPose
EditableMesh:GetFacsPose(action: FacsActionUnit): Tuple
Returns bone IDs and bone Datatype.CFrame|CFrames for all bones in a specific FACS action unit.
GetFacsPoses
EditableMesh:GetFacsPoses(): Array
Returns all FACS action units that have poses defined.
GetNormal
EditableMesh:GetNormal(normalId: int64): Vector3?
Returns the normal vector for the given normal ID.
GetNormals
EditableMesh:GetNormals(): Array
Returns all normals of the mesh.
GetPosition
EditableMesh:GetPosition(vertexId: int64): Vector3
Gets the position of a vertex.
GetSize
EditableMesh:GetSize(): Vector3
Returns the size of the mesh's axis-aligned bounding box.
GetUV
EditableMesh:GetUV(uvId: int64): Vector2?
Returns UV coordinates at the given UV ID.
GetUVs
EditableMesh:GetUVs(): Array
Returns all UVs of the mesh.
GetVertexBones
EditableMesh:GetVertexBones(vertexId: int64): Array
Returns all bone IDs that are associated with the vertex for skinning.
GetVertexBoneWeights
EditableMesh:GetVertexBoneWeights(vertexId: int64): Array
Returns skinning blend weights for each bone that is associated with the vertex.
GetVertexColors
EditableMesh:GetVertexColors(vertexId: int64): Array
Returns the color IDs of the faces attached to the given vertex.
GetVertexFaceColor
EditableMesh:GetVertexFaceColor(vertexId: int64, faceId: int64): int64
Returns the color ID of a vertex/face pair.
GetVertexFaceNormal
EditableMesh:GetVertexFaceNormal(vertexId: int64, faceId: int64): int64
Returns the normal ID of a vertex/face pair.
GetVertexFaces
EditableMesh:GetVertexFaces(vertexId: int64): Array
Returns the face IDs of the faces attached to the given vertex.
GetVertexFaceUV
EditableMesh:GetVertexFaceUV(vertexId: int64, faceId: int64): int64
Returns the UV ID of a vertex/face pair.
GetVertexNormals
EditableMesh:GetVertexNormals(vertexId: int64): Array
Returns the normal IDs of the faces attached to the given vertex.
GetVertexUVs
EditableMesh:GetVertexUVs(vertexId: int64): Array
Returns the UV IDs of the faces attached to the given vertex.
GetVertices
EditableMesh:GetVertices(): Array
Returns all vertices as a list of vertex IDs.
GetVerticesWithColor
EditableMesh:GetVerticesWithColor(colorId: int64): Array
Returns an array of vertex IDs that use the given color ID.
GetVerticesWithNormal
EditableMesh:GetVerticesWithNormal(normalId: int64): Array
Returns an array of vertex IDs that use the given normal ID.
GetVerticesWithUV
EditableMesh:GetVerticesWithUV(uvId: int64): Array
Returns an array of vertex IDs that use the given UV ID.
IdDebugString
EditableMesh:IdDebugString(id: int64): string
Returns a string describing an ID, useful for debugging purposes.
MergeVertices
EditableMesh:MergeVertices(mergeTolerance: float): Map
Merges vertices that touch together.
RaycastLocal
EditableMesh:RaycastLocal(origin: Vector3, direction: Vector3): Tuple
Casts a ray and returns the intersection point, face ID, and barycentric coordinates.
RemoveBone
EditableMesh:RemoveBone(boneId: int64): ()
Removes a bone using its bone ID.
RemoveFace
EditableMesh:RemoveFace(faceId: int64): ()
Removes a face using its face ID.
RemoveUnused
EditableMesh:RemoveUnused(): Array
Removes all unused vertices, normals, UVs, and colors, and returns the removed IDs.
ResetNormal
EditableMesh:ResetNormal(normalId: int64): ()
Reset this normal ID to be automatically calculated.
SetBoneCFrame
EditableMesh:SetBoneCFrame(boneId: int64, cframe: CFrame): ()
Set the initial CFrame for a bone in the mesh's bind pose.
SetBoneIsVirtual
EditableMesh:SetBoneIsVirtual(boneId: int64, virtual: boolean): ()
Set whether a bone is virtual.
SetBoneName
EditableMesh:SetBoneName(boneId: int64, name: string): ()
Sets the name for a bone.
SetBoneParent
EditableMesh:SetBoneParent(boneId: int64, parentBoneId: int64): ()
Set a parent for a bone.
SetColor
EditableMesh:SetColor(colorId: int64, color: Color3): ()
Sets the color for a color ID.
SetColorAlpha
EditableMesh:SetColorAlpha(colorId: int64, alpha: float): ()
Sets the color alpha (transparency) for a color ID.
SetFaceColors
EditableMesh:SetFaceColors(faceId: int64, ids: Array): ()
Sets the face's vertex colors to new color IDs.
SetFaceNormals
EditableMesh:SetFaceNormals(faceId: int64, ids: Array): ()
Sets the face's vertex normals to new normal IDs.
SetFaceUVs
EditableMesh:SetFaceUVs(faceId: int64, ids: Array): ()
Sets the face's vertex UVs to new UV IDs.
SetFaceVertices
EditableMesh:SetFaceVertices(faceId: int64, ids: Array): ()
Sets the face's vertices to new vertex IDs.
SetFacsBonePose
EditableMesh:SetFacsBonePose(action: FacsActionUnit, boneId: int64, cframe: CFrame): ()
Set CFrame for an individual bone in a specific FACS action unit.
SetFacsCorrectivePose
EditableMesh:SetFacsCorrectivePose(actions: Array, boneIds: Array, cframes: Array): ()
Set pose for all bones in a specific FACS corrective pose.
SetFacsPose
EditableMesh:SetFacsPose(action: FacsActionUnit, boneIds: Array, cframes: Array): ()
Set pose for all bones in a specific FACS action unit.
SetNormal
EditableMesh:SetNormal(normalId: int64, normal: Vector3): ()
Set the normal for a normal ID.
SetPosition
EditableMesh:SetPosition(vertexId: int64, p: Vector3): ()
Sets a vertex position in the mesh's local object space.
SetUV
EditableMesh:SetUV(uvId: int64, uv: Vector2): ()
Sets UV coordinates for a UV ID.
SetVertexBones
EditableMesh:SetVertexBones(vertexId: int64, boneIDs: Array): ()
Assign a list of bones with the vertex for skinning.
SetVertexBoneWeights
EditableMesh:SetVertexBoneWeights(vertexId: int64, boneWeights: Array): ()
Sets skinning blend weights for each bone associated with the vertex.
SetVertexFaceColor
EditableMesh:SetVertexFaceColor(vertexId: int64, faceId: int64, colorId: int64): ()
Sets the color ID of a vertex/face pair.
SetVertexFaceNormal
EditableMesh:SetVertexFaceNormal(vertexId: int64, faceId: int64, normalId: int64): ()
Sets the normal ID of a vertex/face pair.
SetVertexFaceUV
EditableMesh:SetVertexFaceUV(vertexId: int64, faceId: int64, uvId: int64): ()
Sets the UV ID of a vertex/face pair.
Triangulate
EditableMesh:Triangulate(): ()
Splits all faces on the mesh to be triangles.

受け継いでいるメンバー

Object から受け継いでいるもの(4)

ClassName・GetPropertyChangedSignal・IsA・Changed

英語の説明とメンバーの一覧は、Roblox Creator Documentation(EditableMesh)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。沖縄マイクラ部 クロスウェーブで、ロブロックス(Roblox)・マインクラフト(マイクラ)・Scratchなどのプログラミングを指導。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにロブロックス(Roblox)やマインクラフト(マイクラ)のプログラミングを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む