Small refactor
This commit is contained in:
parent
ab6ef6d685
commit
d6e2105aa2
@ -65,6 +65,7 @@
|
|||||||
|
|
||||||
#include <bounce/cloth/cloth_mesh.h>
|
#include <bounce/cloth/cloth_mesh.h>
|
||||||
#include <bounce/cloth/grid_cloth_mesh.h>
|
#include <bounce/cloth/grid_cloth_mesh.h>
|
||||||
|
#include <bounce/cloth/garment_cloth_mesh.h>
|
||||||
#include <bounce/cloth/cloth.h>
|
#include <bounce/cloth/cloth.h>
|
||||||
#include <bounce/cloth/particle.h>
|
#include <bounce/cloth/particle.h>
|
||||||
#include <bounce/cloth/cloth_triangle.h>
|
#include <bounce/cloth/cloth_triangle.h>
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#ifndef B3_CLOTH_MESH_H
|
#ifndef B3_CLOTH_MESH_H
|
||||||
#define B3_CLOTH_MESH_H
|
#define B3_CLOTH_MESH_H
|
||||||
|
|
||||||
#include <bounce/common/math/vec2.h>
|
|
||||||
#include <bounce/common/math/vec3.h>
|
#include <bounce/common/math/vec3.h>
|
||||||
|
|
||||||
struct b3ClothMeshTriangle
|
struct b3ClothMeshTriangle
|
||||||
@ -53,16 +52,4 @@ struct b3ClothMesh
|
|||||||
b3ClothMeshSewingLine* sewingLines;
|
b3ClothMeshSewingLine* sewingLines;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct b3GarmentMesh;
|
|
||||||
|
|
||||||
// Convenience structure.
|
|
||||||
struct b3GarmentClothMesh : public b3ClothMesh
|
|
||||||
{
|
|
||||||
b3GarmentClothMesh();
|
|
||||||
~b3GarmentClothMesh();
|
|
||||||
|
|
||||||
// Set this mesh from a 2D garment mesh.
|
|
||||||
void Set(const b3GarmentMesh* garment);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -83,10 +83,10 @@ private:
|
|||||||
// Damping stiffness
|
// Damping stiffness
|
||||||
float32 m_kd;
|
float32 m_kd;
|
||||||
|
|
||||||
// bu
|
// Desired strechiness in u direction
|
||||||
float32 m_bu;
|
float32 m_bu;
|
||||||
|
|
||||||
// bv
|
// Desired strechiness in v direction
|
||||||
float32 m_bv;
|
float32 m_bv;
|
||||||
|
|
||||||
// Action forces
|
// Action forces
|
||||||
|
36
include/bounce/cloth/garment_cloth_mesh.h
Normal file
36
include/bounce/cloth/garment_cloth_mesh.h
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2016-2019 Irlan Robson https://irlanrobson.github.io
|
||||||
|
*
|
||||||
|
* This software is provided 'as-is', without any express or implied
|
||||||
|
* warranty. In no event will the authors be held liable for any damages
|
||||||
|
* arising from the use of this software.
|
||||||
|
* Permission is granted to anyone to use this software for any purpose,
|
||||||
|
* including commercial applications, and to alter it and redistribute it
|
||||||
|
* freely, subject to the following restrictions:
|
||||||
|
* 1. The origin of this software must not be misrepresented; you must not
|
||||||
|
* claim that you wrote the original software. If you use this software
|
||||||
|
* in a product, an acknowledgment in the product documentation would be
|
||||||
|
* appreciated but is not required.
|
||||||
|
* 2. Altered source versions must be plainly marked as such, and must not be
|
||||||
|
* misrepresented as being the original software.
|
||||||
|
* 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef B3_GARMENT_CLOTH_MESH_H
|
||||||
|
#define B3_GARMENT_CLOTH_MESH_H
|
||||||
|
|
||||||
|
#include <bounce/cloth/cloth_mesh.h>
|
||||||
|
|
||||||
|
struct b3GarmentMesh;
|
||||||
|
|
||||||
|
// Convenience structure.
|
||||||
|
struct b3GarmentClothMesh : public b3ClothMesh
|
||||||
|
{
|
||||||
|
b3GarmentClothMesh();
|
||||||
|
~b3GarmentClothMesh();
|
||||||
|
|
||||||
|
// Set this mesh from a 2D garment mesh.
|
||||||
|
void Set(const b3GarmentMesh* garment);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -16,7 +16,7 @@
|
|||||||
* 3. This notice may not be removed or altered from any source distribution.
|
* 3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <bounce/cloth/cloth_mesh.h>
|
#include <bounce/cloth/garment_cloth_mesh.h>
|
||||||
#include <bounce/cloth/garment/garment.h>
|
#include <bounce/cloth/garment/garment.h>
|
||||||
#include <bounce/cloth/garment/garment_mesh.h>
|
#include <bounce/cloth/garment/garment_mesh.h>
|
||||||
#include <bounce/cloth/garment/sewing_pattern.h>
|
#include <bounce/cloth/garment/sewing_pattern.h>
|
Loading…
x
Reference in New Issue
Block a user