MDLObject.Block_enumerateChildObjectsOfClassRootUsingBlockStopPointerNSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
MDLMesh(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
void |
addAttributeWithNameFormat(java.lang.String name,
long format)
addAttributeWithName:format
|
void |
addAttributeWithNameFormatTypeDataStride(java.lang.String name,
long format,
java.lang.String type,
NSData data,
long stride)
addAttributeWithName:format:type:data:stride
|
void |
addAttributeWithNameFormatTypeDataStrideTime(java.lang.String name,
long format,
java.lang.String type,
NSData data,
long stride,
double time)
addAttributeWithName:format:type:data:stride:time
|
void |
addNormalsWithAttributeNamedCreaseThreshold(java.lang.String attributeName,
float creaseThreshold)
addNormalsWithAttributeNamed:creaseThreshold:
|
void |
addOrthTanBasisForTextureCoordinateAttributeNamedNormalAttributeNamedTangentAttributeNamed(java.lang.String textureCoordinateAttributeName,
java.lang.String normalAttributeName,
java.lang.String tangentAttributeName)
addOrthTanBasisForTextureCoordinateAttributeNamed:normalAttributeNamed:tangentAttributeNamed
|
void |
addTangentBasisForTextureCoordinateAttributeNamedNormalAttributeNamedTangentAttributeNamed(java.lang.String textureCoordinateAttributeName,
java.lang.String normalAttributeName,
java.lang.String tangentAttributeName)
addTangentBasisForTextureCoordinateAttributeNamed:normalAttributeNamed:tangentAttributeNamed
|
void |
addTangentBasisForTextureCoordinateAttributeNamedTangentAttributeNamedBitangentAttributeNamed(java.lang.String textureCoordinateAttributeName,
java.lang.String tangentAttributeName,
java.lang.String bitangentAttributeName)
addTangentBasisForTextureCoordinateAttributeNamed:tangentAttributeNamed:bitangentAttributeNamed
|
void |
addUnwrappedTextureCoordinatesForAttributeNamed(java.lang.String textureCoordinateAttributeName)
addTextureCoordinatesForAttributeNamed:textureCoordinateAttributeName
|
static MDLMesh |
alloc() |
MDLMeshBufferAllocator |
allocator()
[@property] allocator
|
static MDLMesh |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
void |
flipTextureCoordinatesInAttributeNamed(java.lang.String textureCoordinateAttributeName)
flipTextureCoordinatesInAttributeNamed:
|
boolean |
generateAmbientOcclusionTextureWithQualityAttenuationFactorObjectsToConsiderVertexAttributeNamedMaterialPropertyNamed(float bakeQuality,
float attenuationFactor,
NSArray<? extends MDLObject> objectsToConsider,
java.lang.String vertexAttributeName,
java.lang.String materialPropertyName)
generateAmbientOcclusionTextureWithQuality:
|
boolean |
generateAmbientOcclusionVertexColorsWithQualityAttenuationFactorObjectsToConsiderVertexAttributeNamed(float bakeQuality,
float attenuationFactor,
NSArray<? extends MDLObject> objectsToConsider,
java.lang.String vertexAttributeName) |
boolean |
generateAmbientOcclusionVertexColorsWithRaysPerSampleAttenuationFactorObjectsToConsiderVertexAttributeNamed(long raysPerSample,
float attenuationFactor,
NSArray<? extends MDLObject> objectsToConsider,
java.lang.String vertexAttributeName) |
boolean |
generateLightMapTextureWithQualityLightsToConsiderObjectsToConsiderVertexAttributeNamedMaterialPropertyNamed(float bakeQuality,
NSArray<? extends MDLLight> lightsToConsider,
NSArray<? extends MDLObject> objectsToConsider,
java.lang.String vertexAttributeName,
java.lang.String materialPropertyName) |
boolean |
generateLightMapVertexColorsWithLightsToConsiderObjectsToConsiderVertexAttributeNamed(NSArray<? extends MDLLight> lightsToConsider,
NSArray<? extends MDLObject> objectsToConsider,
java.lang.String vertexAttributeName) |
static long |
hash_static() |
MDLMesh |
init() |
MDLMesh |
initMeshBySubdividingMeshSubmeshIndexSubdivisionLevelsAllocator(MDLMesh mesh,
int submeshIndex,
int subdivisionLevels,
MDLMeshBufferAllocator allocator)
initMeshBySubdividingMesh:submeshIndex:subdivisionLevels:allocator
|
MDLMesh |
initWithBufferAllocator(MDLMeshBufferAllocator bufferAllocator)
initWithAllocator:
|
MDLMesh |
initWithVertexBuffersVertexCountDescriptorSubmeshes(NSArray<?> vertexBuffers,
long vertexCount,
MDLVertexDescriptor descriptor,
NSArray<? extends MDLSubmesh> submeshes)
initWithVertexBuffer:vertexCount:descriptor:submeshes:
|
MDLMesh |
initWithVertexBufferVertexCountDescriptorSubmeshes(MDLMeshBuffer vertexBuffer,
long vertexCount,
MDLVertexDescriptor descriptor,
NSArray<? extends MDLSubmesh> submeshes)
initWithVertexBuffer:vertexCount:descriptor:submeshes:
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
void |
makeVerticesUnique()
makeVerticesUnique:
|
boolean |
makeVerticesUniqueAndReturnError(org.moe.natj.general.ptr.Ptr<NSError> error)
makeVerticesUniqueAndReturnError:
|
static MDLMesh |
meshWithSCNGeometry(SCNGeometry scnGeometry) |
static MDLMesh |
meshWithSCNGeometryBufferAllocator(SCNGeometry scnGeometry,
MDLMeshBufferAllocator bufferAllocator) |
static MDLMesh |
new_objc() |
static MDLMesh |
newIcosahedronWithRadiusInwardNormalsAllocator(float radius,
boolean inwardNormals,
MDLMeshBufferAllocator allocator) |
static MDLMesh |
newIcosahedronWithRadiusInwardNormalsGeometryTypeAllocator(float radius,
boolean inwardNormals,
long geometryType,
MDLMeshBufferAllocator allocator) |
static MDLMesh |
newSubdividedMeshSubmeshIndexSubdivisionLevels(MDLMesh mesh,
long submeshIndex,
long subdivisionLevels) |
static MDLMesh |
objectWithSCNNode(SCNNode scnNode) |
static MDLMesh |
objectWithSCNNodeBufferAllocator(SCNNode scnNode,
MDLMeshBufferAllocator bufferAllocator) |
void |
removeAttributeNamed(java.lang.String name)
removeAttributeNamed:
|
void |
replaceAttributeNamedWithData(java.lang.String name,
MDLVertexAttributeData newData)
replaceAttributeNamed:withData
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
setSubmeshes(NSMutableArray<MDLSubmesh> value)
[@property] submeshes
|
static void |
setVersion_static(long aVersion) |
void |
setVertexBuffers(NSArray<?> value)
[@property] vertexBuffers
|
void |
setVertexCount(long value)
[@property] vertexCount
|
void |
setVertexDescriptor(MDLVertexDescriptor value)
[@property] vertexDescriptor
|
NSMutableArray<MDLSubmesh> |
submeshes()
[@property] submeshes
|
static org.moe.natj.objc.Class |
superclass_static() |
void |
updateAttributeNamedWithData(java.lang.String name,
MDLVertexAttributeData newData)
updateAttributeNamed:withData
|
static long |
version_static() |
MDLVertexAttributeData |
vertexAttributeDataForAttributeNamed(java.lang.String name)
vertexAttributeDataForAttributeNamed:
|
MDLVertexAttributeData |
vertexAttributeDataForAttributeNamedAsFormat(java.lang.String name,
long format)
vertexAttributeDataForAttributeNamed:asFormat
|
NSArray<?> |
vertexBuffers()
[@property] vertexBuffers
|
long |
vertexCount()
[@property] vertexCount
|
MDLVertexDescriptor |
vertexDescriptor()
[@property] vertexDescriptor
|
addChild, children, components, enumerateChildObjectsOfClassRootUsingBlockStopPointer, hidden, instance, name, objectAtPath, parent, path, setChildren, setHidden, setInstance, setName, setParent_unsafe, setParent, setTransform, transformaccessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static MDLMesh alloc()
public static MDLMesh allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static MDLMesh meshWithSCNGeometry(SCNGeometry scnGeometry)
public static MDLMesh meshWithSCNGeometryBufferAllocator(SCNGeometry scnGeometry, MDLMeshBufferAllocator bufferAllocator)
public static MDLMesh new_objc()
public static MDLMesh newIcosahedronWithRadiusInwardNormalsAllocator(float radius, boolean inwardNormals, MDLMeshBufferAllocator allocator)
public static MDLMesh newIcosahedronWithRadiusInwardNormalsGeometryTypeAllocator(float radius, boolean inwardNormals, long geometryType, MDLMeshBufferAllocator allocator)
public static MDLMesh newSubdividedMeshSubmeshIndexSubdivisionLevels(MDLMesh mesh, long submeshIndex, long subdivisionLevels)
public static MDLMesh objectWithSCNNodeBufferAllocator(SCNNode scnNode, MDLMeshBufferAllocator bufferAllocator)
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public void addAttributeWithNameFormat(java.lang.String name,
long format)
Convenience method to add an attribute
The mesh's allocator will be used to create storage for the new attribute.
public void addAttributeWithNameFormatTypeDataStride(java.lang.String name,
long format,
java.lang.String type,
NSData data,
long stride)
Create a new vertex attribute including an associated buffer with a copy of the supplied data, and update the vertex descriptor accordingly
name - The name the attribute can be found byformat - Format of the data, such as MDLVertexFormatFloat3type - The usage of the attribute, such as MDLVertexAttributePositiondata - Object containing the data to be used in the new vertex bufferstride - The increment in bytes from the start of one data entry to
the next.public void addAttributeWithNameFormatTypeDataStrideTime(java.lang.String name,
long format,
java.lang.String type,
NSData data,
long stride,
double time)
Create a new vertex attribute including an associated buffer with a copy of the supplied data, and update the vertex descriptor accordingly
Adding an attribute, such as position data, at multiple times will result in attributes being created for each of those times. Attributes corresponding to multiple times can be retrieved from the vertex descriptor.
name - The name the attribute can be found byformat - Format of the data, such as MDLVertexFormatFloat3type - The usage of the attribute, such as MDLVertexAttributePositiondata - Object containing the data to be used in the new vertex bufferstride - The increment in bytes from the start of one data entry to
the next.time - The time the attribute is to be invoked at.public void addNormalsWithAttributeNamedCreaseThreshold(java.lang.String attributeName,
float creaseThreshold)
Calculate and add vertex normal data
Uses the attribute named MDLVertexAttributePosition to calculate vertex normals. If the mesh does not have an attribute with 'attributeName', it will be added, otherwise the attribute name will be overwritten with vertex normal data. 'vertexDescriptor' will be updated to reflect the new attribute.
attributeName - Name is the attribute name of vertex normal attribute. If nil, vertex normals
will be added with the MDLVertexAttributeNormal name stringcreaseThreshold - Threshold of the dot product between the 2 triangles after which
their face normal will be smoothed out. Therefore, a threshold of 0 will
smooth everything and a threshold of 1 won't smooth anything.public void addTangentBasisForTextureCoordinateAttributeNamedNormalAttributeNamedTangentAttributeNamed(java.lang.String textureCoordinateAttributeName,
java.lang.String normalAttributeName,
java.lang.String tangentAttributeName)
Create tangents which are orthogonal to the normal
Uses the attribute named MDLVertexAttributePosition and textureCoordinateAttributeName and the specified normals to calculate tangent information. The mesh's vertexDescriptor will be updated to reflect the new attribute if necessary. Note that this method does NOT produce a T.w component which is used in B = (N x T) * T.w Please use addOrthTanBasisForTextureCoordinateAttributeNamed.
textureCoordinateAttributeName - texture coordinates to use in calculationsnormalAttributeName - normals to use in calculationstangentAttributeName - Name of a four component vertex tangent attribute.public void addTangentBasisForTextureCoordinateAttributeNamedTangentAttributeNamedBitangentAttributeNamed(java.lang.String textureCoordinateAttributeName,
java.lang.String tangentAttributeName,
java.lang.String bitangentAttributeName)
Create a shader basis where the tangent and bitangent span the uv -> object space transform
Uses the attribute named MDLVertexAttributePosition and textureCoordinateAttributeName to calculate tangent and bitangent attributes. The mesh's vertexDescriptor will be updated to reflect the new attributes if necessary. The basis may not be orthogonal; to gaurantee an orthogonal tangent basis please use addOrthTanBasisForTextureCoordinateAttibuteNamed selector.
textureCoordinateAttributeName - Name of texture coordinates to use in calculationstangentAttributeName - Name of vertex tangent attribute.bitangentAttributeName - Name of vertex bitangent attribute.public void addUnwrappedTextureCoordinatesForAttributeNamed(java.lang.String textureCoordinateAttributeName)
Creates texture coordinates by unwrapping the mesh
Uses the attribute named MDLVertexAttributePosition and if available, the attribute named MDLVertexAttributeNormal to calculate texture coordinates
textureCoordinateAttributeName - texture coordinates to modify or createpublic MDLMeshBufferAllocator allocator()
allocator used to allocate contained mesh buffers
public boolean generateAmbientOcclusionTextureWithQualityAttenuationFactorObjectsToConsiderVertexAttributeNamedMaterialPropertyNamed(float bakeQuality,
float attenuationFactor,
NSArray<? extends MDLObject> objectsToConsider,
java.lang.String vertexAttributeName,
java.lang.String materialPropertyName)
Creates an Ambient Occlusion texture, returns true upon success, false upon failure
bakeQuality - Float between 0 and 1 that defines quality of the bake process.
0 is of lower quality but bakes faster and uses less memory, where 1 is
of higher quality.attenuationFactor - Float between 0 to 1 that defines how to attenuate the
AO value. 0 doesn't change it, and at 1, all AO values are white except
if they are originally completely black. Quadratic attenuation in between.objectsToConsider - NSArray of MDLMeshes containing the objects to raytrace
againstvertexAttributeName - NSString of the MDLVertexAttribute where the vertex
texture UVs will be stored. Creates it if it doesn't exist, otherwise
overwrites current values.materialPropertyName - NSString of the MDLMaterialProperty that will store
the texture in the Mesh.public boolean generateAmbientOcclusionVertexColorsWithQualityAttenuationFactorObjectsToConsiderVertexAttributeNamed(float bakeQuality,
float attenuationFactor,
NSArray<? extends MDLObject> objectsToConsider,
java.lang.String vertexAttributeName)
public boolean generateAmbientOcclusionVertexColorsWithRaysPerSampleAttenuationFactorObjectsToConsiderVertexAttributeNamed(long raysPerSample,
float attenuationFactor,
NSArray<? extends MDLObject> objectsToConsider,
java.lang.String vertexAttributeName)
public boolean generateLightMapTextureWithQualityLightsToConsiderObjectsToConsiderVertexAttributeNamedMaterialPropertyNamed(float bakeQuality,
NSArray<? extends MDLLight> lightsToConsider,
NSArray<? extends MDLObject> objectsToConsider,
java.lang.String vertexAttributeName,
java.lang.String materialPropertyName)
public boolean generateLightMapVertexColorsWithLightsToConsiderObjectsToConsiderVertexAttributeNamed(NSArray<? extends MDLLight> lightsToConsider, NSArray<? extends MDLObject> objectsToConsider, java.lang.String vertexAttributeName)
public MDLMesh initMeshBySubdividingMeshSubmeshIndexSubdivisionLevelsAllocator(MDLMesh mesh, int submeshIndex, int subdivisionLevels, MDLMeshBufferAllocator allocator)
Factory method that generates a subdivided mesh from a source mesh
Subdivision levels over four are likely to generate more triangles than can be reasonably displayed. Index and vertex data will use the same allocator used for the source mesh. Loading an asset using the topology preservation flag set to YES will result in the best subdivision results.
mesh - Mesh from which to generate a subdivided meshsubmeshIndex - Index of submesh in Mesh's submesh array from which to
generate a subdivided meshsubdivisionLevels - The number of levels to subdivide meshpublic MDLMesh initWithBufferAllocator(MDLMeshBufferAllocator bufferAllocator)
Initialize a mesh with an allocator
public MDLMesh initWithVertexBufferVertexCountDescriptorSubmeshes(MDLMeshBuffer vertexBuffer, long vertexCount, MDLVertexDescriptor descriptor, NSArray<? extends MDLSubmesh> submeshes)
Initialize object with a vertex buffer and a collection of submeshes
vertexBuffer - MDLMeshBuffer object containing all vertex data for the meshvertexCount - Number of vertices in the vertexBufferdescriptor - VertexDescriptor specifying how to interpret vertex datasubmeshes - Array of submeshes with index buffers referencing vertex data
and/or materials to be applied to meshpublic MDLMesh initWithVertexBuffersVertexCountDescriptorSubmeshes(NSArray<?> vertexBuffers, long vertexCount, MDLVertexDescriptor descriptor, NSArray<? extends MDLSubmesh> submeshes)
Initialize object with an array of vertex buffers (Structure of Arrays) and a collection of submeshes
Allows initialization with the layout of the vertexBuffers in a structure-of-arrays form, in other words, non-interleaved vertex attributes
vertexCount - Number of vertices in vertexBuffersdescriptor - VertexDescriptor specifying how to interpret vertex datasubmeshes - Array of submeshes with index buffers referencing vertex data
and/or materials to be applied to meshpublic void makeVerticesUnique()
Deindexes the vertex array
If any vertices are shared on multiple faces, duplicate those vertices so faces do not share vertices. The vertex buffer and index buffers on submeshes may grow to accomadate any vertices added.
public void removeAttributeNamed(java.lang.String name)
remove an attribute
if the named attribute does not exist, nothing happens.
public void replaceAttributeNamedWithData(java.lang.String name,
MDLVertexAttributeData newData)
replace existing attribute data with new attribute data retaining the format of the replacement data.
If the specified attribute does not already exist, it will be created.
public void setSubmeshes(NSMutableArray<MDLSubmesh> value)
Array of submeshes containing an indexbuffer referencing the vertex data and material to be applied when the mesh is rendered
public void setVertexBuffers(NSArray<?> value)
Array of buffers containing vertex data
The vertex buffers in this array are indexed by the vertex descriptor.
public void setVertexCount(long value)
Number of vertices in the vertexBuffers
The size of vertex data in each buffer can be computed by multiplying this value with the stride of the buffer in the vertexDescriptor's layout
public void setVertexDescriptor(MDLVertexDescriptor value)
Immutable vertex descriptor for interpreting data in vertexBuffers
Setting this applies the new layout in 'vertexBuffers' thus is a heavyweight operation as structured copies of almost all vertex buffer data could be made. Additionally, if the new vertexDescriptor does not have an attribute in the original vertexDescriptor, that attribute will be deleted. If the original vertexDescriptor does not have an attribute in the new vertexDescriptor, the data for the added attribute set as the added attribute's initializationValue property.
The allocator associated with each original meshbuffer is used to reallocate the corresponding resultant meshbuffer.
public NSMutableArray<MDLSubmesh> submeshes()
Array of submeshes containing an indexbuffer referencing the vertex data and material to be applied when the mesh is rendered
public void updateAttributeNamedWithData(java.lang.String name,
MDLVertexAttributeData newData)
update existing attribute data with new attribute data retaining the format of the existing data.
If the specified attribute does not already exist, it will be created with the same format as the newData.
public MDLVertexAttributeData vertexAttributeDataForAttributeNamed(java.lang.String name)
convenience selector to get quick access to vertex attribute data
the vertex buffer will remain mapped until the MDLVertexAttributeData is freed.
public MDLVertexAttributeData vertexAttributeDataForAttributeNamedAsFormat(java.lang.String name, long format)
convenience selector to get quick access to vertex attribute data reformatted to the requested format if necessary.
If the desired format has less elements than the source attribute elements, excess elements will be discarded. If the desired format has more elements than the source attribute, then the destination elements will be set to zero. The vertex buffer will remain mapped until the MDLVertexAttributeData is freed.
public NSArray<?> vertexBuffers()
Array of buffers containing vertex data
The vertex buffers in this array are indexed by the vertex descriptor.
public long vertexCount()
Number of vertices in the vertexBuffers
The size of vertex data in each buffer can be computed by multiplying this value with the stride of the buffer in the vertexDescriptor's layout
public MDLVertexDescriptor vertexDescriptor()
Immutable vertex descriptor for interpreting data in vertexBuffers
Setting this applies the new layout in 'vertexBuffers' thus is a heavyweight operation as structured copies of almost all vertex buffer data could be made. Additionally, if the new vertexDescriptor does not have an attribute in the original vertexDescriptor, that attribute will be deleted. If the original vertexDescriptor does not have an attribute in the new vertexDescriptor, the data for the added attribute set as the added attribute's initializationValue property.
The allocator associated with each original meshbuffer is used to reallocate the corresponding resultant meshbuffer.
public void addOrthTanBasisForTextureCoordinateAttributeNamedNormalAttributeNamedTangentAttributeNamed(java.lang.String textureCoordinateAttributeName,
java.lang.String normalAttributeName,
java.lang.String tangentAttributeName)
Create an orthonormal tangent basis with tangent specified
Uses the attribute named MDLVertexAttributePosition and textureCoordinateAttributeName and the specified normals to calculate tangent information. The mesh's vertexDescriptor will be updated to reflect the new attribute if necessary. Note that the bitangent can be calculated from the normal and tangent by B = (N x T) * T.w
textureCoordinateAttributeName - texture coordinates to use in calculationsnormalAttributeName - normals to use in calculationstangentAttributeName - Name of a three/four component vertex tangent attribute.public void flipTextureCoordinatesInAttributeNamed(java.lang.String textureCoordinateAttributeName)
Flips texture coordinates by performing the operation (u,v) = (u, 1-v)
Many application generate model files with texture coordinate mapping assuming a bottom left bitmap origin. It can be more convenient to have texture coordinates corresponding to an upper left bitmap origin. This selector will perform the flip operation if the requested texture coordinate attribute exists on the mesh. An exception will be raised if the attribute cannot be found
textureCoordinateAttributeName - texture coordinates to modifypublic boolean makeVerticesUniqueAndReturnError(org.moe.natj.general.ptr.Ptr<NSError> error)
Deindexes the vertex array
If any vertices are shared on multiple faces, duplicate those vertices so faces do not share vertices. The vertex buffer and index buffers on submeshes may grow to accomadate any vertices added.