Skip to content
Snippets Groups Projects
Commit 9fef3a1f authored by Alecu100's avatar Alecu100
Browse files

made more changes to the complex shape to prepare it for skyrim and fallout 3 support

parent 4b6e8837
No related branches found
No related tags found
No related merge requests found
......@@ -182,8 +182,7 @@ public:
int max_bones_per_partition = 4,
bool stripify = false,
bool tangent_space = false,
float min_vertex_weight = 0.001f,
bool use_dismember_partitions = false
float min_vertex_weight = 0.001f
) const;
/*
......
......@@ -698,17 +698,24 @@ void ComplexShape::Merge( NiAVObject * root ) {
//Done Merging
}
Ref<NiAVObject> ComplexShape::Split( NiNode * parent, Matrix44 & transform, int max_bones_per_partition, bool stripify, bool tangent_space, float min_vertex_weight, bool use_dismember_partitions ) const {
Ref<NiAVObject> ComplexShape::Split( NiNode * parent, Matrix44 & transform, int max_bones_per_partition, bool stripify, bool tangent_space, float min_vertex_weight ) const {
//Make sure parent is not NULL
if ( parent == NULL ) {
throw runtime_error ("A parent is necessary to split a complex shape.");
}
if( use_dismember_partitions == true ) {
if(dismemberPartitionsFaces.size() != faces.size()) {
bool use_dismember_partitions = false;
if( dismemberPartitionsFaces.size() > 0 ) {
if( dismemberPartitionsFaces.size() != faces.size() ) {
throw runtime_error ("The number of faces mapped to skin partitions is different from the actual face count.");
}
if(dismemberPartitionsBodyParts.size() == 0) {
throw runtime_error ("The number of dismember partition body parts can't be 0.");
}
use_dismember_partitions = true;
}
//There will be one NiTriShape per property group
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment