svn merge ^/trunk/blender -r48585:48604
This commit is contained in:
commit
48d0d32f73
@ -1009,9 +1009,11 @@ elseif(WIN32)
|
||||
set(BOOST ${LIBDIR}/boost)
|
||||
set(BOOST_INCLUDE_DIR ${BOOST}/include)
|
||||
if(MSVC10)
|
||||
set(BOOST_POSTFIX "vc100-mt-s-1_47.lib")
|
||||
set(BOOST_DEBUG_POSTFIX "vc100-mt-sgd-1_47.lib")
|
||||
set(BOOST_LIBPATH ${BOOST}/lib/vc_10)
|
||||
set(BOOST_POSTFIX "vc100-mt-s-1_49.lib")
|
||||
set(BOOST_DEBUG_POSTFIX "vc100-mt-sgd-1_49.lib")
|
||||
else()
|
||||
set(BOOST_LIBPATH ${BOOST}/lib)
|
||||
set(BOOST_POSTFIX "vc90-mt-s-1_49.lib")
|
||||
set(BOOST_DEBUG_POSTFIX "vc90-mt-sgd-1_49.lib")
|
||||
endif()
|
||||
@ -1020,11 +1022,6 @@ elseif(WIN32)
|
||||
optimized libboost_regex-${BOOST_POSTFIX} optimized libboost_system-${BOOST_POSTFIX} optimized libboost_thread-${BOOST_POSTFIX}
|
||||
debug libboost_date_time-${BOOST_DEBUG_POSTFIX} debug libboost_filesystem-${BOOST_DEBUG_POSTFIX}
|
||||
debug libboost_regex-${BOOST_DEBUG_POSTFIX} debug libboost_system-${BOOST_DEBUG_POSTFIX} debug libboost_thread-${BOOST_DEBUG_POSTFIX})
|
||||
if(MSVC10)
|
||||
set(BOOST_LIBPATH ${BOOST}/lib/vc_10)
|
||||
else()
|
||||
set(BOOST_LIBPATH ${BOOST}/lib)
|
||||
endif()
|
||||
set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB")
|
||||
endif()
|
||||
|
||||
|
@ -162,21 +162,21 @@ help:
|
||||
@echo " * package_pacman - build an arch linux pacmanpackage"
|
||||
@echo " * package_archive - build an archive package"
|
||||
@echo ""
|
||||
@echo "Testing Targets (not assosiated with building blender)"
|
||||
@echo "Testing Targets (not associated with building blender)"
|
||||
@echo " * test - run ctest, currently tests import/export, operator execution and that python modules load"
|
||||
@echo " * test_cmake - runs our own cmake file checker which detects errors in the cmake file list definitions"
|
||||
@echo " * test_pep8 - checks all python script are pep8 which are tagged to use the stricter formatting"
|
||||
@echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed"
|
||||
@echo " * test_style - checks C/C++ conforms with blenders style guide: http://wiki.blender.org/index.php/Dev:Doc/CodeStyle"
|
||||
@echo ""
|
||||
@echo "Static Source Code Checking (not assosiated with building blender)"
|
||||
@echo "Static Source Code Checking (not associated with building blender)"
|
||||
@echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
|
||||
@echo " * check_splint - run blenders source through splint (C only)"
|
||||
@echo " * check_sparse - run blenders source through sparse (C only)"
|
||||
@echo " * check_spelling_c - check for spelling errors (C/C++ only)"
|
||||
@echo " * check_spelling_py - check for spelling errors (Python only)"
|
||||
@echo ""
|
||||
@echo "Documentation Targets (not assosiated with building blender)"
|
||||
@echo "Documentation Targets (not associated with building blender)"
|
||||
@echo " * doc_py - generate sphinx python api docs"
|
||||
@echo " * doc_doxy - generate doxygen C/C++ docs"
|
||||
@echo " * doc_dna - generate blender file format reference"
|
||||
|
@ -37,7 +37,7 @@
|
||||
Much of the actual functionality can be found in the python scripts
|
||||
in the directory $BLENDERHOME/tools, with Blender.py defining the
|
||||
bulk of the functionality. btools.py has some helper functions, and
|
||||
bcolors.py is for the terminal colours. mstoolkit.py and crossmingw.py
|
||||
bcolors.py is for the terminal colors. mstoolkit.py and crossmingw.py
|
||||
are modules which set up SCons for the MS VC++ 2003 toolkit and
|
||||
the cross-compile toolset for compiling Windows binaries on Linux
|
||||
respectively. Note: the cross-compile doesn't work yet for Blender,
|
||||
|
@ -48,7 +48,7 @@
|
||||
% python ./scons/scons.py
|
||||
|
||||
This will start the build process with default values. Depending
|
||||
on your platform you may see colour in your output (non-Windows
|
||||
on your platform you may see color in your output (non-Windows
|
||||
machines). In the the beginning an overview of targets and arguments
|
||||
from the command-line is given, then all libraries and binaries to
|
||||
build are configured.
|
||||
@ -123,11 +123,11 @@
|
||||
|
||||
This rewrite features a cleaner output during the build process. If
|
||||
you need to see the full command-line for compiles, then you can
|
||||
change that behaviour. Also the use of colours can be changed:
|
||||
change that behaviour. Also the use of colors can be changed:
|
||||
|
||||
% python scons\scons.py BF_FANCY=0
|
||||
|
||||
This will disable the use of colours.
|
||||
This will disable the use of colors.
|
||||
|
||||
% python scons\scons.py BF_QUIET=0
|
||||
|
||||
|
@ -173,7 +173,7 @@ drawtype:
|
||||
UI_EMBOSSN 2 /* Button with no border */
|
||||
UI_EMBOSSF 3 /* Square embossed button (file select) */
|
||||
UI_EMBOSSM 4 /* Colored, for pulldown menus */
|
||||
UI_EMBOSSP 5 /* Simple borderless coloured button (like blender sensors) */
|
||||
UI_EMBOSSP 5 /* Simple borderless colored button (like blender sensors) */
|
||||
|
||||
font:
|
||||
UI_HELV 0 /* normal font */
|
||||
|
@ -94,11 +94,11 @@ Functions
|
||||
If filename starts with // the image will be saved relative to the current directory.
|
||||
If the filename contains # it will be replaced with the frame number.
|
||||
|
||||
The standalone player saves .png files. It does not support colour space conversion
|
||||
The standalone player saves .png files. It does not support color space conversion
|
||||
or gamma correction.
|
||||
|
||||
When run from Blender, makeScreenshot supports Iris, IrisZ, TGA, Raw TGA, PNG, HamX, and Jpeg.
|
||||
Gamma, Colourspace conversion and Jpeg compression are taken from the Render settings panels.
|
||||
Gamma, Colorspace conversion and Jpeg compression are taken from the Render settings panels.
|
||||
|
||||
:type filename: string
|
||||
|
||||
@ -125,14 +125,14 @@ Functions
|
||||
|
||||
.. function:: setBackgroundColor(rgba)
|
||||
|
||||
Sets the window background colour.
|
||||
Sets the window background color.
|
||||
|
||||
:type rgba: list [r, g, b, a]
|
||||
|
||||
|
||||
.. function:: setMistColor(rgb)
|
||||
|
||||
Sets the mist colour.
|
||||
Sets the mist color.
|
||||
|
||||
:type rgb: list [r, g, b]
|
||||
|
||||
@ -153,8 +153,8 @@ Functions
|
||||
|
||||
.. function:: setMistEnd(end)
|
||||
|
||||
Sets the mist end value. Objects further away from this will be coloured solid with
|
||||
the colour set by setMistColor().
|
||||
Sets the mist end value. Objects further away from this will be colored solid with
|
||||
the color set by setMistColor().
|
||||
|
||||
:type end: float
|
||||
|
||||
|
@ -1683,7 +1683,7 @@ Game Types (bge.types)
|
||||
light = co.owner
|
||||
|
||||
light.energy = 1.0
|
||||
light.colour = [1.0, 0.0, 0.0]
|
||||
light.color = [1.0, 0.0, 0.0]
|
||||
|
||||
.. data:: SPOT
|
||||
|
||||
@ -1719,15 +1719,15 @@ Game Types (bge.types)
|
||||
|
||||
:type: float
|
||||
|
||||
.. attribute:: colour
|
||||
.. attribute:: color
|
||||
|
||||
The colour of this light. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
|
||||
The color of this light. Black = [0.0, 0.0, 0.0], White = [1.0, 1.0, 1.0].
|
||||
|
||||
:type: list [r, g, b]
|
||||
|
||||
.. attribute:: color
|
||||
.. attribute:: colour
|
||||
|
||||
Synonym for colour.
|
||||
Synonym for color.
|
||||
|
||||
.. attribute:: lin_attenuation
|
||||
|
||||
@ -1782,7 +1782,7 @@ Game Types (bge.types)
|
||||
#. They are at the same position
|
||||
#. UV coordinates are the same
|
||||
#. Their normals are the same (both polygons are "Set Smooth")
|
||||
#. They are the same colour, for example: a cube has 24 vertices: 6 faces with 4 vertices per face.
|
||||
#. They are the same color, for example: a cube has 24 vertices: 6 faces with 4 vertices per face.
|
||||
|
||||
The correct method of iterating over every :class:`KX_VertexProxy` in a game object
|
||||
|
||||
@ -1798,8 +1798,8 @@ Game Types (bge.types)
|
||||
for v_index in range(mesh.getVertexArrayLength(m_index)):
|
||||
vertex = mesh.getVertex(m_index, v_index)
|
||||
# Do something with vertex here...
|
||||
# ... eg: colour the vertex red.
|
||||
vertex.colour = [1.0, 0.0, 0.0, 1.0]
|
||||
# ... eg: color the vertex red.
|
||||
vertex.color = [1.0, 0.0, 0.0, 1.0]
|
||||
|
||||
.. attribute:: materials
|
||||
|
||||
@ -2538,13 +2538,13 @@ Game Types (bge.types)
|
||||
|
||||
.. attribute:: diffuse
|
||||
|
||||
The diffuse colour of the material. black = [0.0, 0.0, 0.0] white = [1.0, 1.0, 1.0].
|
||||
The diffuse color of the material. black = [0.0, 0.0, 0.0] white = [1.0, 1.0, 1.0].
|
||||
|
||||
:type: list [r, g, b]
|
||||
|
||||
.. attribute:: specular
|
||||
|
||||
The specular colour of the material. black = [0.0, 0.0, 0.0] white = [1.0, 1.0, 1.0].
|
||||
The specular color of the material. black = [0.0, 0.0, 0.0] white = [1.0, 1.0, 1.0].
|
||||
|
||||
:type: list [r, g, b]
|
||||
|
||||
@ -3381,7 +3381,7 @@ Game Types (bge.types)
|
||||
|
||||
.. class:: KX_VertexProxy(SCA_IObject)
|
||||
|
||||
A vertex holds position, UV, colour and normal information.
|
||||
A vertex holds position, UV, color and normal information.
|
||||
|
||||
Note:
|
||||
The physics simulation is NOT currently updated - physics will not respond
|
||||
@ -3405,17 +3405,17 @@ Game Types (bge.types)
|
||||
|
||||
:type: list [nx, ny, nz]
|
||||
|
||||
.. attribute:: colour
|
||||
.. attribute:: color
|
||||
|
||||
The colour of the vertex.
|
||||
The color of the vertex.
|
||||
|
||||
:type: list [r, g, b, a]
|
||||
|
||||
Black = [0.0, 0.0, 0.0, 1.0], White = [1.0, 1.0, 1.0, 1.0]
|
||||
|
||||
.. attribute:: color
|
||||
.. attribute:: colour
|
||||
|
||||
Synonym for colour.
|
||||
Synonym for color.
|
||||
|
||||
.. attribute:: x
|
||||
|
||||
@ -3461,25 +3461,25 @@ Game Types (bge.types)
|
||||
|
||||
.. attribute:: r
|
||||
|
||||
The red component of the vertex colour. 0.0 <= r <= 1.0.
|
||||
The red component of the vertex color. 0.0 <= r <= 1.0.
|
||||
|
||||
:type: float
|
||||
|
||||
.. attribute:: g
|
||||
|
||||
The green component of the vertex colour. 0.0 <= g <= 1.0.
|
||||
The green component of the vertex color. 0.0 <= g <= 1.0.
|
||||
|
||||
:type: float
|
||||
|
||||
.. attribute:: b
|
||||
|
||||
The blue component of the vertex colour. 0.0 <= b <= 1.0.
|
||||
The blue component of the vertex color. 0.0 <= b <= 1.0.
|
||||
|
||||
:type: float
|
||||
|
||||
.. attribute:: a
|
||||
|
||||
The alpha component of the vertex colour. 0.0 <= a <= 1.0.
|
||||
The alpha component of the vertex color. 0.0 <= a <= 1.0.
|
||||
|
||||
:type: float
|
||||
|
||||
@ -3529,15 +3529,15 @@ Game Types (bge.types)
|
||||
|
||||
.. method:: getRGBA()
|
||||
|
||||
Gets the colour of this vertex.
|
||||
Gets the color of this vertex.
|
||||
|
||||
The colour is represented as four bytes packed into an integer value. The colour is
|
||||
The color is represented as four bytes packed into an integer value. The color is
|
||||
packed as RGBA.
|
||||
|
||||
Since Python offers no way to get each byte without shifting, you must use the struct module to
|
||||
access colour in an machine independent way.
|
||||
access color in an machine independent way.
|
||||
|
||||
Because of this, it is suggested you use the r, g, b and a attributes or the colour attribute instead.
|
||||
Because of this, it is suggested you use the r, g, b and a attributes or the color attribute instead.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@ -3547,17 +3547,17 @@ Game Types (bge.types)
|
||||
# black = ( 0, 0, 0, 255)
|
||||
# white = (255, 255, 255, 255)
|
||||
|
||||
:return: packed colour. 4 byte integer with one byte per colour channel in RGBA format.
|
||||
:return: packed color. 4 byte integer with one byte per color channel in RGBA format.
|
||||
:rtype: integer
|
||||
|
||||
.. method:: setRGBA(col)
|
||||
|
||||
Sets the colour of this vertex.
|
||||
Sets the color of this vertex.
|
||||
|
||||
See getRGBA() for the format of col, and its relevant problems. Use the r, g, b and a attributes
|
||||
or the colour attribute instead.
|
||||
or the color attribute instead.
|
||||
|
||||
setRGBA() also accepts a four component list as argument col. The list represents the colour as [r, g, b, a]
|
||||
setRGBA() also accepts a four component list as argument col. The list represents the color as [r, g, b, a]
|
||||
with black = [0.0, 0.0, 0.0, 1.0] and white = [1.0, 1.0, 1.0, 1.0]
|
||||
|
||||
.. code-block:: python
|
||||
@ -3567,7 +3567,7 @@ Game Types (bge.types)
|
||||
v.setRGBA([1.0, 0.0, 0.0, 1.0]) # Red
|
||||
v.setRGBA([0.0, 1.0, 0.0, 1.0]) # Green on all platforms.
|
||||
|
||||
:arg col: the new colour of this vertex in packed RGBA format.
|
||||
:arg col: the new color of this vertex in packed RGBA format.
|
||||
:type col: integer or list [r, g, b, a]
|
||||
|
||||
.. method:: getNormal()
|
||||
|
46
extern/carve/include/carve/csg.hpp
vendored
46
extern/carve/include/carve/csg.hpp
vendored
@ -174,34 +174,34 @@ namespace carve {
|
||||
|
||||
void groupIntersections();
|
||||
|
||||
void _generateVertexVertexIntersections(carve::mesh::MeshSet<3>::vertex_t *va,
|
||||
carve::mesh::MeshSet<3>::edge_t *eb);
|
||||
void generateVertexVertexIntersections(carve::mesh::MeshSet<3>::face_t *a,
|
||||
const std::vector<carve::mesh::MeshSet<3>::face_t *> &b);
|
||||
void _generateVertexVertexIntersections(meshset_t::vertex_t *va,
|
||||
meshset_t::edge_t *eb);
|
||||
void generateVertexVertexIntersections(meshset_t::face_t *a,
|
||||
const std::vector<meshset_t::face_t *> &b);
|
||||
|
||||
void _generateVertexEdgeIntersections(carve::mesh::MeshSet<3>::vertex_t *va,
|
||||
carve::mesh::MeshSet<3>::edge_t *eb);
|
||||
void generateVertexEdgeIntersections(carve::mesh::MeshSet<3>::face_t *a,
|
||||
const std::vector<carve::mesh::MeshSet<3>::face_t *> &b);
|
||||
void _generateVertexEdgeIntersections(meshset_t::vertex_t *va,
|
||||
meshset_t::edge_t *eb);
|
||||
void generateVertexEdgeIntersections(meshset_t::face_t *a,
|
||||
const std::vector<meshset_t::face_t *> &b);
|
||||
|
||||
void _generateEdgeEdgeIntersections(carve::mesh::MeshSet<3>::edge_t *ea,
|
||||
carve::mesh::MeshSet<3>::edge_t *eb);
|
||||
void generateEdgeEdgeIntersections(carve::mesh::MeshSet<3>::face_t *a,
|
||||
const std::vector<carve::mesh::MeshSet<3>::face_t *> &b);
|
||||
void _generateEdgeEdgeIntersections(meshset_t::edge_t *ea,
|
||||
meshset_t::edge_t *eb);
|
||||
void generateEdgeEdgeIntersections(meshset_t::face_t *a,
|
||||
const std::vector<meshset_t::face_t *> &b);
|
||||
|
||||
void _generateVertexFaceIntersections(carve::mesh::MeshSet<3>::face_t *fa,
|
||||
carve::mesh::MeshSet<3>::edge_t *eb);
|
||||
void generateVertexFaceIntersections(carve::mesh::MeshSet<3>::face_t *a,
|
||||
const std::vector<carve::mesh::MeshSet<3>::face_t *> &b);
|
||||
void _generateVertexFaceIntersections(meshset_t::face_t *fa,
|
||||
meshset_t::edge_t *eb);
|
||||
void generateVertexFaceIntersections(meshset_t::face_t *a,
|
||||
const std::vector<meshset_t::face_t *> &b);
|
||||
|
||||
void _generateEdgeFaceIntersections(carve::mesh::MeshSet<3>::face_t *fa,
|
||||
carve::mesh::MeshSet<3>::edge_t *eb);
|
||||
void generateEdgeFaceIntersections(carve::mesh::MeshSet<3>::face_t *a,
|
||||
const std::vector<carve::mesh::MeshSet<3>::face_t *> &b);
|
||||
void _generateEdgeFaceIntersections(meshset_t::face_t *fa,
|
||||
meshset_t::edge_t *eb);
|
||||
void generateEdgeFaceIntersections(meshset_t::face_t *a,
|
||||
const std::vector<meshset_t::face_t *> &b);
|
||||
|
||||
void generateIntersectionCandidates(carve::mesh::MeshSet<3> *a,
|
||||
void generateIntersectionCandidates(meshset_t *a,
|
||||
const face_rtree_t *a_node,
|
||||
carve::mesh::MeshSet<3> *b,
|
||||
meshset_t *b,
|
||||
const face_rtree_t *b_node,
|
||||
face_pairs_t &face_pairs,
|
||||
bool descend_a = true);
|
||||
@ -287,7 +287,7 @@ namespace carve {
|
||||
* @param[out] out_loops A list of grouped face loops.
|
||||
*/
|
||||
void groupFaceLoops(
|
||||
carve::mesh::MeshSet<3> *src,
|
||||
meshset_t *src,
|
||||
FaceLoopList &face_loops,
|
||||
const detail::LoopEdges &loop_edges,
|
||||
const V2Set &no_cross,
|
||||
|
5
extern/carve/include/carve/polyline_decl.hpp
vendored
5
extern/carve/include/carve/polyline_decl.hpp
vendored
@ -138,6 +138,11 @@ namespace carve {
|
||||
PolylineSet(const std::vector<carve::geom3d::Vector> &points);
|
||||
PolylineSet() {
|
||||
}
|
||||
~PolylineSet() {
|
||||
for (line_iter i = lines.begin(); i != lines.end(); ++i) {
|
||||
delete *i;
|
||||
}
|
||||
}
|
||||
|
||||
template<typename iter_t>
|
||||
void addPolyline(bool closed, iter_t begin, iter_t end);
|
||||
|
13
extern/carve/include/carve/rtree.hpp
vendored
13
extern/carve/include/carve/rtree.hpp
vendored
@ -49,8 +49,6 @@ namespace carve {
|
||||
|
||||
aabb_t getAABB() const { return bbox; }
|
||||
|
||||
|
||||
|
||||
struct data_aabb_t {
|
||||
aabb_t bbox;
|
||||
data_t data;
|
||||
@ -164,6 +162,17 @@ namespace carve {
|
||||
_fill(begin, end, typename std::iterator_traits<iter_t>::value_type());
|
||||
}
|
||||
|
||||
~RTreeNode() {
|
||||
if (child) {
|
||||
RTreeNode *next = child;
|
||||
while (next) {
|
||||
RTreeNode *curr = next;
|
||||
next = next->sibling;
|
||||
delete curr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// functor for ordering nodes by increasing aabb midpoint, along a specified axis.
|
||||
|
4
extern/carve/lib/csg_data.hpp
vendored
4
extern/carve/lib/csg_data.hpp
vendored
@ -30,7 +30,7 @@ struct carve::csg::detail::Data {
|
||||
VVMap vmap;
|
||||
|
||||
// map from intersected edge to intersection points.
|
||||
EVSMap emap;
|
||||
EIntMap emap;
|
||||
|
||||
// map from intersected face to intersection points.
|
||||
FVSMap fmap;
|
||||
@ -39,7 +39,7 @@ struct carve::csg::detail::Data {
|
||||
VFSMap fmap_rev;
|
||||
|
||||
// created by divideEdges().
|
||||
// holds, for each edge, a
|
||||
// holds, for each edge, an ordered vector of inserted vertices.
|
||||
EVVMap divided_edges;
|
||||
|
||||
// created by faceSplitEdges.
|
||||
|
30
extern/carve/lib/csg_detail.hpp
vendored
30
extern/carve/lib/csg_detail.hpp
vendored
@ -24,30 +24,32 @@
|
||||
namespace carve {
|
||||
namespace csg {
|
||||
namespace detail {
|
||||
typedef std::map<carve::mesh::MeshSet<3>::vertex_t *,
|
||||
std::set<std::pair<carve::mesh::MeshSet<3>::face_t *, double> > > EdgeIntInfo;
|
||||
|
||||
typedef std::unordered_set<carve::mesh::MeshSet<3>::vertex_t *> VSet;
|
||||
typedef std::unordered_set<carve::mesh::MeshSet<3>::face_t *> FSet;
|
||||
typedef std::unordered_set<carve::mesh::MeshSet<3>::vertex_t *> VSet;
|
||||
typedef std::unordered_set<carve::mesh::MeshSet<3>::face_t *> FSet;
|
||||
|
||||
typedef std::set<carve::mesh::MeshSet<3>::vertex_t *> VSetSmall;
|
||||
typedef std::set<csg::V2> V2SetSmall;
|
||||
typedef std::set<carve::mesh::MeshSet<3>::face_t *> FSetSmall;
|
||||
typedef std::set<carve::mesh::MeshSet<3>::vertex_t *> VSetSmall;
|
||||
typedef std::set<csg::V2> V2SetSmall;
|
||||
typedef std::set<carve::mesh::MeshSet<3>::face_t *> FSetSmall;
|
||||
|
||||
typedef std::unordered_map<carve::mesh::MeshSet<3>::vertex_t *, VSetSmall> VVSMap;
|
||||
typedef std::unordered_map<carve::mesh::MeshSet<3>::edge_t *, VSetSmall> EVSMap;
|
||||
typedef std::unordered_map<carve::mesh::MeshSet<3>::face_t *, VSetSmall> FVSMap;
|
||||
typedef std::unordered_map<carve::mesh::MeshSet<3>::vertex_t *, VSetSmall> VVSMap;
|
||||
typedef std::unordered_map<carve::mesh::MeshSet<3>::edge_t *, EdgeIntInfo> EIntMap;
|
||||
typedef std::unordered_map<carve::mesh::MeshSet<3>::face_t *, VSetSmall> FVSMap;
|
||||
|
||||
typedef std::unordered_map<carve::mesh::MeshSet<3>::vertex_t *, FSetSmall> VFSMap;
|
||||
typedef std::unordered_map<carve::mesh::MeshSet<3>::face_t *, V2SetSmall> FV2SMap;
|
||||
typedef std::unordered_map<carve::mesh::MeshSet<3>::vertex_t *, FSetSmall> VFSMap;
|
||||
typedef std::unordered_map<carve::mesh::MeshSet<3>::face_t *, V2SetSmall> FV2SMap;
|
||||
|
||||
typedef std::unordered_map<
|
||||
carve::mesh::MeshSet<3>::edge_t *,
|
||||
std::vector<carve::mesh::MeshSet<3>::vertex_t *> > EVVMap;
|
||||
typedef std::unordered_map<
|
||||
carve::mesh::MeshSet<3>::edge_t *,
|
||||
std::vector<carve::mesh::MeshSet<3>::vertex_t *> > EVVMap;
|
||||
|
||||
typedef std::unordered_map<carve::mesh::MeshSet<3>::vertex_t *,
|
||||
std::vector<carve::mesh::MeshSet<3>::edge_t *> > VEVecMap;
|
||||
|
||||
|
||||
class LoopEdges : public std::unordered_map<V2, std::list<FaceLoop *> > {
|
||||
class LoopEdges : public std::unordered_map<V2, std::list<FaceLoop *> > {
|
||||
typedef std::unordered_map<V2, std::list<FaceLoop *> > super;
|
||||
|
||||
public:
|
||||
|
291
extern/carve/lib/intersect.cpp
vendored
291
extern/carve/lib/intersect.cpp
vendored
@ -41,6 +41,7 @@
|
||||
#include <carve/timing.hpp>
|
||||
#include <carve/colour.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
||||
|
||||
@ -114,7 +115,7 @@ namespace {
|
||||
ordered_vertices.reserve(std::distance(beg, end));
|
||||
|
||||
for (; beg != end; ++beg) {
|
||||
carve::mesh::MeshSet<3>::vertex_t *v = (*beg);
|
||||
carve::mesh::MeshSet<3>::vertex_t *v = *beg;
|
||||
ordered_vertices.push_back(std::make_pair(carve::geom::dot(v->v - base, dir), v));
|
||||
}
|
||||
|
||||
@ -130,6 +131,37 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
template<typename iter_t>
|
||||
void orderEdgeIntersectionVertices(iter_t beg, const iter_t end,
|
||||
const carve::mesh::MeshSet<3>::vertex_t::vector_t &dir,
|
||||
const carve::mesh::MeshSet<3>::vertex_t::vector_t &base,
|
||||
std::vector<carve::mesh::MeshSet<3>::vertex_t *> &out) {
|
||||
typedef std::vector<std::pair<std::pair<double, double>, carve::mesh::MeshSet<3>::vertex_t *> > DVVector;
|
||||
DVVector ordered_vertices;
|
||||
|
||||
ordered_vertices.reserve(std::distance(beg, end));
|
||||
|
||||
for (; beg != end; ++beg) {
|
||||
carve::mesh::MeshSet<3>::vertex_t *v = (*beg).first;
|
||||
double ovec = 0.0;
|
||||
for (carve::csg::detail::EdgeIntInfo::mapped_type::const_iterator j = (*beg).second.begin(); j != (*beg).second.end(); ++j) {
|
||||
ovec += (*j).second;
|
||||
}
|
||||
ordered_vertices.push_back(std::make_pair(std::make_pair(carve::geom::dot(v->v - base, dir), -ovec), v));
|
||||
}
|
||||
|
||||
std::sort(ordered_vertices.begin(), ordered_vertices.end());
|
||||
|
||||
out.clear();
|
||||
out.reserve(ordered_vertices.size());
|
||||
for (DVVector::const_iterator
|
||||
i = ordered_vertices.begin(), e = ordered_vertices.end();
|
||||
i != e;
|
||||
++i) {
|
||||
out.push_back((*i).second);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@ -346,7 +378,7 @@ bool carve::csg::CSG::Hooks::hasHook(unsigned hook_num) {
|
||||
return hooks[hook_num].size() > 0;
|
||||
}
|
||||
|
||||
void carve::csg::CSG::Hooks::intersectionVertex(const carve::mesh::MeshSet<3>::vertex_t *vertex,
|
||||
void carve::csg::CSG::Hooks::intersectionVertex(const meshset_t::vertex_t *vertex,
|
||||
const IObjPairSet &intersections) {
|
||||
for (std::list<Hook *>::iterator j = hooks[INTERSECTION_VERTEX_HOOK].begin();
|
||||
j != hooks[INTERSECTION_VERTEX_HOOK].end();
|
||||
@ -355,8 +387,8 @@ void carve::csg::CSG::Hooks::intersectionVertex(const carve::mesh::MeshSet<3>::v
|
||||
}
|
||||
}
|
||||
|
||||
void carve::csg::CSG::Hooks::processOutputFace(std::vector<carve::mesh::MeshSet<3>::face_t *> &faces,
|
||||
const carve::mesh::MeshSet<3>::face_t *orig_face,
|
||||
void carve::csg::CSG::Hooks::processOutputFace(std::vector<meshset_t::face_t *> &faces,
|
||||
const meshset_t::face_t *orig_face,
|
||||
bool flipped) {
|
||||
for (std::list<Hook *>::iterator j = hooks[PROCESS_OUTPUT_FACE_HOOK].begin();
|
||||
j != hooks[PROCESS_OUTPUT_FACE_HOOK].end();
|
||||
@ -365,8 +397,8 @@ void carve::csg::CSG::Hooks::processOutputFace(std::vector<carve::mesh::MeshSet<
|
||||
}
|
||||
}
|
||||
|
||||
void carve::csg::CSG::Hooks::resultFace(const carve::mesh::MeshSet<3>::face_t *new_face,
|
||||
const carve::mesh::MeshSet<3>::face_t *orig_face,
|
||||
void carve::csg::CSG::Hooks::resultFace(const meshset_t::face_t *new_face,
|
||||
const meshset_t::face_t *orig_face,
|
||||
bool flipped) {
|
||||
for (std::list<Hook *>::iterator j = hooks[RESULT_FACE_HOOK].begin();
|
||||
j != hooks[RESULT_FACE_HOOK].end();
|
||||
@ -425,7 +457,7 @@ void carve::csg::CSG::makeVertexIntersections() {
|
||||
j != je;
|
||||
++j) {
|
||||
const IObj &i_tgt = ((*j).first);
|
||||
carve::mesh::MeshSet<3>::vertex_t *i_pt = ((*j).second);
|
||||
meshset_t::vertex_t *i_pt = ((*j).second);
|
||||
|
||||
vertex_intersections[i_pt].insert(std::make_pair(i_src, i_tgt));
|
||||
}
|
||||
@ -499,7 +531,7 @@ void carve::csg::CSG::groupIntersections() {
|
||||
|
||||
carve::TimingBlock block(GROUP_INTERSECTONS);
|
||||
|
||||
std::vector<carve::mesh::MeshSet<3>::vertex_t *> vertices;
|
||||
std::vector<meshset_t::vertex_t *> vertices;
|
||||
detail::VVSMap graph;
|
||||
#if defined(CARVE_DEBUG)
|
||||
std::cerr << "groupIntersections()" << ": vertex_intersections.size()==" << vertex_intersections.size() << std::endl;
|
||||
@ -521,7 +553,7 @@ void carve::csg::CSG::groupIntersections() {
|
||||
|
||||
vertex_intersections_octree.addVertices(vertices);
|
||||
|
||||
std::vector<carve::mesh::MeshSet<3>::vertex_t *> out;
|
||||
std::vector<meshset_t::vertex_t *> out;
|
||||
for (size_t i = 0, l = vertices.size(); i != l; ++i) {
|
||||
// let's find all the vertices near this one.
|
||||
out.clear();
|
||||
@ -546,7 +578,7 @@ void carve::csg::CSG::groupIntersections() {
|
||||
open.insert((*i).first);
|
||||
while (open.size()) {
|
||||
detail::VSet::iterator t = open.begin();
|
||||
const carve::mesh::MeshSet<3>::vertex_t *o = (*t);
|
||||
const meshset_t::vertex_t *o = (*t);
|
||||
open.erase(t);
|
||||
i = graph.find(o);
|
||||
CARVE_ASSERT(i != graph.end());
|
||||
@ -568,6 +600,19 @@ void carve::csg::CSG::groupIntersections() {
|
||||
}
|
||||
|
||||
|
||||
static void recordEdgeIntersectionInfo(carve::mesh::MeshSet<3>::vertex_t *intersection,
|
||||
carve::mesh::MeshSet<3>::edge_t *edge,
|
||||
const carve::csg::detail::VFSMap::mapped_type &intersected_faces,
|
||||
carve::csg::detail::Data &data) {
|
||||
carve::mesh::MeshSet<3>::vertex_t::vector_t edge_dir = edge->v2()->v - edge->v1()->v;
|
||||
carve::csg::detail::EdgeIntInfo::mapped_type &eint_info = data.emap[edge][intersection];
|
||||
|
||||
for (carve::csg::detail::VFSMap::mapped_type::const_iterator i = intersected_faces.begin(); i != intersected_faces.end(); ++i) {
|
||||
carve::mesh::MeshSet<3>::vertex_t::vector_t normal = (*i)->plane.N;
|
||||
eint_info.insert(std::make_pair((*i), carve::geom::dot(edge_dir, normal)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void carve::csg::CSG::intersectingFacePairs(detail::Data &data) {
|
||||
static carve::TimingName FUNC_NAME("CSG::intersectingFacePairs()");
|
||||
@ -575,30 +620,36 @@ void carve::csg::CSG::intersectingFacePairs(detail::Data &data) {
|
||||
|
||||
// iterate over all intersection points.
|
||||
for (VertexIntersections::const_iterator i = vertex_intersections.begin(), ie = vertex_intersections.end(); i != ie; ++i) {
|
||||
carve::mesh::MeshSet<3>::vertex_t *i_pt = ((*i).first);
|
||||
meshset_t::vertex_t *i_pt = ((*i).first);
|
||||
detail::VFSMap::mapped_type &face_set = (data.fmap_rev[i_pt]);
|
||||
|
||||
detail::VFSMap::mapped_type src_face_set;
|
||||
detail::VFSMap::mapped_type tgt_face_set;
|
||||
// for all pairs of intersecting objects at this point
|
||||
for (VertexIntersections::data_type::const_iterator j = (*i).second.begin(), je = (*i).second.end(); j != je; ++j) {
|
||||
const IObj &i_src = ((*j).first);
|
||||
const IObj &i_tgt = ((*j).second);
|
||||
|
||||
// work out the faces involved. this updates fmap_rev.
|
||||
facesForObject(i_src, data.vert_to_edges, face_set);
|
||||
facesForObject(i_tgt, data.vert_to_edges, face_set);
|
||||
src_face_set.clear();
|
||||
tgt_face_set.clear();
|
||||
// work out the faces involved.
|
||||
facesForObject(i_src, data.vert_to_edges, src_face_set);
|
||||
facesForObject(i_tgt, data.vert_to_edges, tgt_face_set);
|
||||
// this updates fmap_rev.
|
||||
std::copy(src_face_set.begin(), src_face_set.end(), set_inserter(face_set));
|
||||
std::copy(tgt_face_set.begin(), tgt_face_set.end(), set_inserter(face_set));
|
||||
|
||||
// record the intersection with respect to any involved vertex.
|
||||
if (i_src.obtype == IObj::OBTYPE_VERTEX) data.vmap[i_src.vertex] = i_pt;
|
||||
if (i_tgt.obtype == IObj::OBTYPE_VERTEX) data.vmap[i_tgt.vertex] = i_pt;
|
||||
|
||||
// record the intersection with respect to any involved edge.
|
||||
if (i_src.obtype == IObj::OBTYPE_EDGE) data.emap[i_src.edge].insert(i_pt);
|
||||
if (i_tgt.obtype == IObj::OBTYPE_EDGE) data.emap[i_tgt.edge].insert(i_pt);
|
||||
if (i_src.obtype == IObj::OBTYPE_EDGE) recordEdgeIntersectionInfo(i_pt, i_src.edge, tgt_face_set, data);
|
||||
if (i_tgt.obtype == IObj::OBTYPE_EDGE) recordEdgeIntersectionInfo(i_pt, i_tgt.edge, src_face_set, data);
|
||||
}
|
||||
|
||||
// record the intersection with respect to each face.
|
||||
for (carve::csg::detail::VFSMap::mapped_type::const_iterator k = face_set.begin(), ke = face_set.end(); k != ke; ++k) {
|
||||
carve::mesh::MeshSet<3>::face_t *f = (*k);
|
||||
meshset_t::face_t *f = (*k);
|
||||
data.fmap[f].insert(i_pt);
|
||||
}
|
||||
}
|
||||
@ -606,8 +657,8 @@ void carve::csg::CSG::intersectingFacePairs(detail::Data &data) {
|
||||
|
||||
|
||||
|
||||
void carve::csg::CSG::_generateVertexVertexIntersections(carve::mesh::MeshSet<3>::vertex_t *va,
|
||||
carve::mesh::MeshSet<3>::edge_t *eb) {
|
||||
void carve::csg::CSG::_generateVertexVertexIntersections(meshset_t::vertex_t *va,
|
||||
meshset_t::edge_t *eb) {
|
||||
if (intersections.intersects(va, eb->v1())) {
|
||||
return;
|
||||
}
|
||||
@ -621,14 +672,14 @@ void carve::csg::CSG::_generateVertexVertexIntersections(carve::mesh::MeshSet<3>
|
||||
|
||||
|
||||
|
||||
void carve::csg::CSG::generateVertexVertexIntersections(carve::mesh::MeshSet<3>::face_t *a,
|
||||
const std::vector<carve::mesh::MeshSet<3>::face_t *> &b) {
|
||||
carve::mesh::MeshSet<3>::edge_t *ea, *eb;
|
||||
void carve::csg::CSG::generateVertexVertexIntersections(meshset_t::face_t *a,
|
||||
const std::vector<meshset_t::face_t *> &b) {
|
||||
meshset_t::edge_t *ea, *eb;
|
||||
|
||||
ea = a->edge;
|
||||
do {
|
||||
for (size_t i = 0; i < b.size(); ++i) {
|
||||
carve::mesh::MeshSet<3>::face_t *t = b[i];
|
||||
meshset_t::face_t *t = b[i];
|
||||
eb = t->edge;
|
||||
do {
|
||||
_generateVertexVertexIntersections(ea->v1(), eb);
|
||||
@ -641,8 +692,8 @@ void carve::csg::CSG::generateVertexVertexIntersections(carve::mesh::MeshSet<3>:
|
||||
|
||||
|
||||
|
||||
void carve::csg::CSG::_generateVertexEdgeIntersections(carve::mesh::MeshSet<3>::vertex_t *va,
|
||||
carve::mesh::MeshSet<3>::edge_t *eb) {
|
||||
void carve::csg::CSG::_generateVertexEdgeIntersections(meshset_t::vertex_t *va,
|
||||
meshset_t::edge_t *eb) {
|
||||
if (intersections.intersects(va, eb)) {
|
||||
return;
|
||||
}
|
||||
@ -665,14 +716,14 @@ void carve::csg::CSG::_generateVertexEdgeIntersections(carve::mesh::MeshSet<3>::
|
||||
|
||||
|
||||
|
||||
void carve::csg::CSG::generateVertexEdgeIntersections(carve::mesh::MeshSet<3>::face_t *a,
|
||||
const std::vector<carve::mesh::MeshSet<3>::face_t *> &b) {
|
||||
carve::mesh::MeshSet<3>::edge_t *ea, *eb;
|
||||
void carve::csg::CSG::generateVertexEdgeIntersections(meshset_t::face_t *a,
|
||||
const std::vector<meshset_t::face_t *> &b) {
|
||||
meshset_t::edge_t *ea, *eb;
|
||||
|
||||
ea = a->edge;
|
||||
do {
|
||||
for (size_t i = 0; i < b.size(); ++i) {
|
||||
carve::mesh::MeshSet<3>::face_t *t = b[i];
|
||||
meshset_t::face_t *t = b[i];
|
||||
eb = t->edge;
|
||||
do {
|
||||
_generateVertexEdgeIntersections(ea->v1(), eb);
|
||||
@ -685,21 +736,21 @@ void carve::csg::CSG::generateVertexEdgeIntersections(carve::mesh::MeshSet<3>::f
|
||||
|
||||
|
||||
|
||||
void carve::csg::CSG::_generateEdgeEdgeIntersections(carve::mesh::MeshSet<3>::edge_t *ea,
|
||||
carve::mesh::MeshSet<3>::edge_t *eb) {
|
||||
void carve::csg::CSG::_generateEdgeEdgeIntersections(meshset_t::edge_t *ea,
|
||||
meshset_t::edge_t *eb) {
|
||||
if (intersections.intersects(ea, eb)) {
|
||||
return;
|
||||
}
|
||||
|
||||
carve::mesh::MeshSet<3>::vertex_t *v1 = ea->v1(), *v2 = ea->v2();
|
||||
carve::mesh::MeshSet<3>::vertex_t *v3 = eb->v1(), *v4 = eb->v2();
|
||||
meshset_t::vertex_t *v1 = ea->v1(), *v2 = ea->v2();
|
||||
meshset_t::vertex_t *v3 = eb->v1(), *v4 = eb->v2();
|
||||
|
||||
carve::geom::aabb<3> ea_aabb, eb_aabb;
|
||||
ea_aabb.fit(v1->v, v2->v);
|
||||
eb_aabb.fit(v3->v, v4->v);
|
||||
if (ea_aabb.maxAxisSeparation(eb_aabb) > EPSILON) return;
|
||||
|
||||
carve::mesh::MeshSet<3>::vertex_t::vector_t p1, p2;
|
||||
meshset_t::vertex_t::vector_t p1, p2;
|
||||
double mu1, mu2;
|
||||
|
||||
switch (carve::geom3d::rayRayIntersection(carve::geom3d::Ray(v2->v - v1->v, v1->v),
|
||||
@ -708,7 +759,7 @@ void carve::csg::CSG::_generateEdgeEdgeIntersections(carve::mesh::MeshSet<3>::ed
|
||||
case carve::RR_INTERSECTION: {
|
||||
// edges intersect
|
||||
if (mu1 >= 0.0 && mu1 <= 1.0 && mu2 >= 0.0 && mu2 <= 1.0) {
|
||||
carve::mesh::MeshSet<3>::vertex_t *p = vertex_pool.get((p1 + p2) / 2.0);
|
||||
meshset_t::vertex_t *p = vertex_pool.get((p1 + p2) / 2.0);
|
||||
intersections.record(ea, eb, p);
|
||||
if (ea->rev) intersections.record(ea->rev, eb, p);
|
||||
if (eb->rev) intersections.record(ea, eb->rev, p);
|
||||
@ -733,14 +784,14 @@ void carve::csg::CSG::_generateEdgeEdgeIntersections(carve::mesh::MeshSet<3>::ed
|
||||
|
||||
|
||||
|
||||
void carve::csg::CSG::generateEdgeEdgeIntersections(carve::mesh::MeshSet<3>::face_t *a,
|
||||
const std::vector<carve::mesh::MeshSet<3>::face_t *> &b) {
|
||||
carve::mesh::MeshSet<3>::edge_t *ea, *eb;
|
||||
void carve::csg::CSG::generateEdgeEdgeIntersections(meshset_t::face_t *a,
|
||||
const std::vector<meshset_t::face_t *> &b) {
|
||||
meshset_t::edge_t *ea, *eb;
|
||||
|
||||
ea = a->edge;
|
||||
do {
|
||||
for (size_t i = 0; i < b.size(); ++i) {
|
||||
carve::mesh::MeshSet<3>::face_t *t = b[i];
|
||||
meshset_t::face_t *t = b[i];
|
||||
eb = t->edge;
|
||||
do {
|
||||
_generateEdgeEdgeIntersections(ea, eb);
|
||||
@ -753,8 +804,8 @@ void carve::csg::CSG::generateEdgeEdgeIntersections(carve::mesh::MeshSet<3>::fac
|
||||
|
||||
|
||||
|
||||
void carve::csg::CSG::_generateVertexFaceIntersections(carve::mesh::MeshSet<3>::face_t *fa,
|
||||
carve::mesh::MeshSet<3>::edge_t *eb) {
|
||||
void carve::csg::CSG::_generateVertexFaceIntersections(meshset_t::face_t *fa,
|
||||
meshset_t::edge_t *eb) {
|
||||
if (intersections.intersects(eb->v1(), fa)) {
|
||||
return;
|
||||
}
|
||||
@ -769,12 +820,12 @@ void carve::csg::CSG::_generateVertexFaceIntersections(carve::mesh::MeshSet<3>::
|
||||
|
||||
|
||||
|
||||
void carve::csg::CSG::generateVertexFaceIntersections(carve::mesh::MeshSet<3>::face_t *a,
|
||||
const std::vector<carve::mesh::MeshSet<3>::face_t *> &b) {
|
||||
carve::mesh::MeshSet<3>::edge_t *ea, *eb;
|
||||
void carve::csg::CSG::generateVertexFaceIntersections(meshset_t::face_t *a,
|
||||
const std::vector<meshset_t::face_t *> &b) {
|
||||
meshset_t::edge_t *eb;
|
||||
|
||||
for (size_t i = 0; i < b.size(); ++i) {
|
||||
carve::mesh::MeshSet<3>::face_t *t = b[i];
|
||||
meshset_t::face_t *t = b[i];
|
||||
eb = t->edge;
|
||||
do {
|
||||
_generateVertexFaceIntersections(a, eb);
|
||||
@ -785,15 +836,15 @@ void carve::csg::CSG::generateVertexFaceIntersections(carve::mesh::MeshSet<3>::f
|
||||
|
||||
|
||||
|
||||
void carve::csg::CSG::_generateEdgeFaceIntersections(carve::mesh::MeshSet<3>::face_t *fa,
|
||||
carve::mesh::MeshSet<3>::edge_t *eb) {
|
||||
void carve::csg::CSG::_generateEdgeFaceIntersections(meshset_t::face_t *fa,
|
||||
meshset_t::edge_t *eb) {
|
||||
if (intersections.intersects(eb, fa)) {
|
||||
return;
|
||||
}
|
||||
|
||||
carve::mesh::MeshSet<3>::vertex_t::vector_t _p;
|
||||
meshset_t::vertex_t::vector_t _p;
|
||||
if (fa->simpleLineSegmentIntersection(carve::geom3d::LineSegment(eb->v1()->v, eb->v2()->v), _p)) {
|
||||
carve::mesh::MeshSet<3>::vertex_t *p = vertex_pool.get(_p);
|
||||
meshset_t::vertex_t *p = vertex_pool.get(_p);
|
||||
intersections.record(eb, fa, p);
|
||||
if (eb->rev) intersections.record(eb->rev, fa, p);
|
||||
}
|
||||
@ -801,12 +852,12 @@ void carve::csg::CSG::_generateEdgeFaceIntersections(carve::mesh::MeshSet<3>::fa
|
||||
|
||||
|
||||
|
||||
void carve::csg::CSG::generateEdgeFaceIntersections(carve::mesh::MeshSet<3>::face_t *a,
|
||||
const std::vector<carve::mesh::MeshSet<3>::face_t *> &b) {
|
||||
carve::mesh::MeshSet<3>::edge_t *ea, *eb;
|
||||
void carve::csg::CSG::generateEdgeFaceIntersections(meshset_t::face_t *a,
|
||||
const std::vector<meshset_t::face_t *> &b) {
|
||||
meshset_t::edge_t *eb;
|
||||
|
||||
for (size_t i = 0; i < b.size(); ++i) {
|
||||
carve::mesh::MeshSet<3>::face_t *t = b[i];
|
||||
meshset_t::face_t *t = b[i];
|
||||
eb = t->edge;
|
||||
do {
|
||||
_generateEdgeFaceIntersections(a, eb);
|
||||
@ -817,9 +868,9 @@ void carve::csg::CSG::generateEdgeFaceIntersections(carve::mesh::MeshSet<3>::fac
|
||||
|
||||
|
||||
|
||||
void carve::csg::CSG::generateIntersectionCandidates(carve::mesh::MeshSet<3> *a,
|
||||
void carve::csg::CSG::generateIntersectionCandidates(meshset_t *a,
|
||||
const face_rtree_t *a_node,
|
||||
carve::mesh::MeshSet<3> *b,
|
||||
meshset_t *b,
|
||||
const face_rtree_t *b_node,
|
||||
face_pairs_t &face_pairs,
|
||||
bool descend_a) {
|
||||
@ -837,12 +888,12 @@ void carve::csg::CSG::generateIntersectionCandidates(carve::mesh::MeshSet<3> *a,
|
||||
}
|
||||
} else {
|
||||
for (size_t i = 0; i < a_node->data.size(); ++i) {
|
||||
carve::mesh::MeshSet<3>::face_t *fa = a_node->data[i];
|
||||
meshset_t::face_t *fa = a_node->data[i];
|
||||
carve::geom::aabb<3> aabb_a = fa->getAABB();
|
||||
if (aabb_a.maxAxisSeparation(b_node->bbox) > carve::EPSILON) continue;
|
||||
|
||||
for (size_t j = 0; j < b_node->data.size(); ++j) {
|
||||
carve::mesh::MeshSet<3>::face_t *fb = b_node->data[j];
|
||||
meshset_t::face_t *fb = b_node->data[j];
|
||||
carve::geom::aabb<3> aabb_b = fb->getAABB();
|
||||
if (aabb_b.maxAxisSeparation(aabb_a) > carve::EPSILON) continue;
|
||||
|
||||
@ -866,17 +917,17 @@ void carve::csg::CSG::generateIntersectionCandidates(carve::mesh::MeshSet<3> *a,
|
||||
|
||||
|
||||
|
||||
void carve::csg::CSG::generateIntersections(carve::mesh::MeshSet<3> *a,
|
||||
void carve::csg::CSG::generateIntersections(meshset_t *a,
|
||||
const face_rtree_t *a_rtree,
|
||||
carve::mesh::MeshSet<3> *b,
|
||||
meshset_t *b,
|
||||
const face_rtree_t *b_rtree,
|
||||
detail::Data &data) {
|
||||
face_pairs_t face_pairs;
|
||||
generateIntersectionCandidates(a, a_rtree, b, b_rtree, face_pairs);
|
||||
|
||||
for (face_pairs_t::const_iterator i = face_pairs.begin(); i != face_pairs.end(); ++i) {
|
||||
carve::mesh::MeshSet<3>::face_t *f = (*i).first;
|
||||
carve::mesh::MeshSet<3>::edge_t *e = f->edge;
|
||||
meshset_t::face_t *f = (*i).first;
|
||||
meshset_t::edge_t *e = f->edge;
|
||||
do {
|
||||
data.vert_to_edges[e->v1()].push_back(e);
|
||||
e = e->next;
|
||||
@ -958,13 +1009,13 @@ void carve::csg::CSG::divideIntersectedEdges(detail::Data &data) {
|
||||
static carve::TimingName FUNC_NAME("CSG::divideIntersectedEdges()");
|
||||
carve::TimingBlock block(FUNC_NAME);
|
||||
|
||||
for (detail::EVSMap::const_iterator i = data.emap.begin(), ei = data.emap.end(); i != ei; ++i) {
|
||||
carve::mesh::MeshSet<3>::edge_t *edge = (*i).first;
|
||||
const detail::EVSMap::mapped_type &vertices = (*i).second;
|
||||
std::vector<carve::mesh::MeshSet<3>::vertex_t *> &verts = data.divided_edges[edge];
|
||||
orderVertices(vertices.begin(), vertices.end(),
|
||||
edge->v2()->v - edge->v1()->v, edge->v1()->v,
|
||||
verts);
|
||||
for (detail::EIntMap::const_iterator i = data.emap.begin(), ei = data.emap.end(); i != ei; ++i) {
|
||||
meshset_t::edge_t *edge = (*i).first;
|
||||
const detail::EIntMap::mapped_type &int_info = (*i).second;
|
||||
std::vector<meshset_t::vertex_t *> &verts = data.divided_edges[edge];
|
||||
orderEdgeIntersectionVertices(int_info.begin(), int_info.end(),
|
||||
edge->v2()->v - edge->v1()->v, edge->v1()->v,
|
||||
verts);
|
||||
}
|
||||
}
|
||||
|
||||
@ -982,7 +1033,7 @@ void carve::csg::CSG::makeFaceEdges(carve::csg::EdgeClassification &eclass,
|
||||
i = data.fmap.begin(), ie = data.fmap.end();
|
||||
i != ie;
|
||||
++i) {
|
||||
carve::mesh::MeshSet<3>::face_t *face_a = (*i).first;
|
||||
meshset_t::face_t *face_a = (*i).first;
|
||||
const detail::FVSMap::mapped_type &face_a_intersections = ((*i).second);
|
||||
face_b_set.clear();
|
||||
|
||||
@ -995,7 +1046,7 @@ void carve::csg::CSG::makeFaceEdges(carve::csg::EdgeClassification &eclass,
|
||||
k = data.fmap_rev[*j].begin(), ke = data.fmap_rev[*j].end();
|
||||
k != ke;
|
||||
++k) {
|
||||
carve::mesh::MeshSet<3>::face_t *face_b = (*k);
|
||||
meshset_t::face_t *face_b = (*k);
|
||||
if (face_a != face_b && face_b->mesh->meshset != face_a->mesh->meshset) {
|
||||
face_b_set.insert(face_b);
|
||||
}
|
||||
@ -1007,10 +1058,10 @@ void carve::csg::CSG::makeFaceEdges(carve::csg::EdgeClassification &eclass,
|
||||
j = face_b_set.begin(), je = face_b_set.end();
|
||||
j != je;
|
||||
++j) {
|
||||
carve::mesh::MeshSet<3>::face_t *face_b = (*j);
|
||||
meshset_t::face_t *face_b = (*j);
|
||||
const detail::FVSMap::mapped_type &face_b_intersections = (data.fmap[face_b]);
|
||||
|
||||
std::vector<carve::mesh::MeshSet<3>::vertex_t *> vertices;
|
||||
std::vector<meshset_t::vertex_t *> vertices;
|
||||
vertices.reserve(std::min(face_a_intersections.size(), face_b_intersections.size()));
|
||||
|
||||
// record the points of intersection between face_a and face_b
|
||||
@ -1024,7 +1075,7 @@ void carve::csg::CSG::makeFaceEdges(carve::csg::EdgeClassification &eclass,
|
||||
std::cerr << "face pair: "
|
||||
<< face_a << ":" << face_b
|
||||
<< " N(verts) " << vertices.size() << std::endl;
|
||||
for (std::vector<carve::mesh::MeshSet<3>::vertex_t *>::const_iterator i = vertices.begin(), e = vertices.end(); i != e; ++i) {
|
||||
for (std::vector<meshset_t::vertex_t *>::const_iterator i = vertices.begin(), e = vertices.end(); i != e; ++i) {
|
||||
std::cerr << (*i) << " " << (*i)->v << " ("
|
||||
<< carve::geom::distance(face_a->plane, (*i)->v) << ","
|
||||
<< carve::geom::distance(face_b->plane, (*i)->v) << ")"
|
||||
@ -1036,8 +1087,8 @@ void carve::csg::CSG::makeFaceEdges(carve::csg::EdgeClassification &eclass,
|
||||
|
||||
// if there are two points of intersection, then the added edge is simple to determine.
|
||||
if (vertices.size() == 2) {
|
||||
carve::mesh::MeshSet<3>::vertex_t *v1 = vertices[0];
|
||||
carve::mesh::MeshSet<3>::vertex_t *v2 = vertices[1];
|
||||
meshset_t::vertex_t *v1 = vertices[0];
|
||||
meshset_t::vertex_t *v2 = vertices[1];
|
||||
carve::geom3d::Vector c = (v1->v + v2->v) / 2;
|
||||
|
||||
// determine whether the midpoint of the implied edge is contained in face_a and face_b
|
||||
@ -1065,7 +1116,7 @@ void carve::csg::CSG::makeFaceEdges(carve::csg::EdgeClassification &eclass,
|
||||
|
||||
// otherwise, it's more complex.
|
||||
carve::geom3d::Vector base, dir;
|
||||
std::vector<carve::mesh::MeshSet<3>::vertex_t *> ordered;
|
||||
std::vector<meshset_t::vertex_t *> ordered;
|
||||
|
||||
// skip coplanar edges. this simplifies the resulting
|
||||
// mesh. eventually all coplanar face regions of two polyhedra
|
||||
@ -1080,8 +1131,8 @@ void carve::csg::CSG::makeFaceEdges(carve::csg::EdgeClassification &eclass,
|
||||
// for each possible edge in the ordering, test the midpoint,
|
||||
// and record if it's contained in face_a and face_b.
|
||||
for (int k = 0, ke = (int)ordered.size() - 1; k < ke; ++k) {
|
||||
carve::mesh::MeshSet<3>::vertex_t *v1 = ordered[k];
|
||||
carve::mesh::MeshSet<3>::vertex_t *v2 = ordered[k + 1];
|
||||
meshset_t::vertex_t *v1 = ordered[k];
|
||||
meshset_t::vertex_t *v2 = ordered[k + 1];
|
||||
carve::geom3d::Vector c = (v1->v + v2->v) / 2;
|
||||
|
||||
#if defined(CARVE_DEBUG)
|
||||
@ -1125,7 +1176,7 @@ void carve::csg::CSG::makeFaceEdges(carve::csg::EdgeClassification &eclass,
|
||||
|
||||
carve::line::PolylineSet intersection_graph;
|
||||
intersection_graph.vertices.resize(vertices.size());
|
||||
std::map<const carve::mesh::MeshSet<3>::vertex_t *, size_t> vmap;
|
||||
std::map<const meshset_t::vertex_t *, size_t> vmap;
|
||||
|
||||
size_t j = 0;
|
||||
for (detail::VSet::const_iterator i = vertices.begin(); i != vertices.end(); ++i) {
|
||||
@ -1195,9 +1246,9 @@ static void checkFaceLoopIntegrity(carve::csg::FaceLoopList &fll) {
|
||||
* @param b_edge_count
|
||||
* @param hooks
|
||||
*/
|
||||
void carve::csg::CSG::calc(carve::mesh::MeshSet<3> *a,
|
||||
void carve::csg::CSG::calc(meshset_t *a,
|
||||
const face_rtree_t *a_rtree,
|
||||
carve::mesh::MeshSet<3> *b,
|
||||
meshset_t *b,
|
||||
const face_rtree_t *b_rtree,
|
||||
carve::csg::VertexClassification &vclass,
|
||||
carve::csg::EdgeClassification &eclass,
|
||||
@ -1260,12 +1311,12 @@ void carve::csg::CSG::calc(carve::mesh::MeshSet<3> *a,
|
||||
|
||||
#if defined(CARVE_DEBUG_WRITE_PLY_DATA)
|
||||
{
|
||||
std::string out("/tmp/a_split.ply");
|
||||
writePLY(out, faceLoopsToPolyhedron(a_face_loops), false);
|
||||
std::auto_ptr<carve::mesh::MeshSet<3> > poly(faceLoopsToPolyhedron(a_face_loops));
|
||||
writePLY("/tmp/a_split.ply", poly.get(), false);
|
||||
}
|
||||
{
|
||||
std::string out("/tmp/b_split.ply");
|
||||
writePLY(out, faceLoopsToPolyhedron(b_face_loops), false);
|
||||
std::auto_ptr<carve::mesh::MeshSet<3> > poly(faceLoopsToPolyhedron(b_face_loops));
|
||||
writePLY("/tmp/b_split.ply", poly.get(), false);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1276,11 +1327,11 @@ void carve::csg::CSG::calc(carve::mesh::MeshSet<3> *a,
|
||||
std::cerr << "classify" << std::endl;
|
||||
#endif
|
||||
// initialize some classification information.
|
||||
for (std::vector<carve::mesh::MeshSet<3>::vertex_t>::iterator
|
||||
for (std::vector<meshset_t::vertex_t>::iterator
|
||||
i = a->vertex_storage.begin(), e = a->vertex_storage.end(); i != e; ++i) {
|
||||
vclass[map_vertex(data.vmap, &(*i))].cls[0] = POINT_ON;
|
||||
}
|
||||
for (std::vector<carve::mesh::MeshSet<3>::vertex_t>::iterator
|
||||
for (std::vector<meshset_t::vertex_t>::iterator
|
||||
i = b->vertex_storage.begin(), e = b->vertex_storage.end(); i != e; ++i) {
|
||||
vclass[map_vertex(data.vmap, &(*i))].cls[1] = POINT_ON;
|
||||
}
|
||||
@ -1351,8 +1402,8 @@ void returnSharedEdges(carve::csg::V2Set &shared_edges,
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
carve::mesh::MeshSet<3> *carve::csg::CSG::compute(carve::mesh::MeshSet<3> *a,
|
||||
carve::mesh::MeshSet<3> *b,
|
||||
carve::mesh::MeshSet<3> *carve::csg::CSG::compute(meshset_t *a,
|
||||
meshset_t *b,
|
||||
carve::csg::CSG::Collector &collector,
|
||||
carve::csg::V2Set *shared_edges_ptr,
|
||||
CLASSIFY_TYPE classify_type) {
|
||||
@ -1371,13 +1422,13 @@ carve::mesh::MeshSet<3> *carve::csg::CSG::compute(carve::mesh::MeshSet<3> *a,
|
||||
size_t a_edge_count;
|
||||
size_t b_edge_count;
|
||||
|
||||
face_rtree_t *a_rtree = face_rtree_t::construct_STR(a->faceBegin(), a->faceEnd(), 4, 4);
|
||||
face_rtree_t *b_rtree = face_rtree_t::construct_STR(b->faceBegin(), b->faceEnd(), 4, 4);
|
||||
std::auto_ptr<face_rtree_t> a_rtree(face_rtree_t::construct_STR(a->faceBegin(), a->faceEnd(), 4, 4));
|
||||
std::auto_ptr<face_rtree_t> b_rtree(face_rtree_t::construct_STR(b->faceBegin(), b->faceEnd(), 4, 4));
|
||||
|
||||
{
|
||||
static carve::TimingName FUNC_NAME("CSG::compute - calc()");
|
||||
carve::TimingBlock block(FUNC_NAME);
|
||||
calc(a, a_rtree, b, b_rtree, vclass, eclass,a_face_loops, b_face_loops, a_edge_count, b_edge_count);
|
||||
calc(a, a_rtree.get(), b, b_rtree.get(), vclass, eclass,a_face_loops, b_face_loops, a_edge_count, b_edge_count);
|
||||
}
|
||||
|
||||
detail::LoopEdges a_edge_map;
|
||||
@ -1445,11 +1496,11 @@ carve::mesh::MeshSet<3> *carve::csg::CSG::compute(carve::mesh::MeshSet<3> *a,
|
||||
classifyFaceGroupsEdge(shared_edges,
|
||||
vclass,
|
||||
a,
|
||||
a_rtree,
|
||||
a_rtree.get(),
|
||||
a_loops_grouped,
|
||||
a_edge_map,
|
||||
b,
|
||||
b_rtree,
|
||||
b_rtree.get(),
|
||||
b_loops_grouped,
|
||||
b_edge_map,
|
||||
collector);
|
||||
@ -1458,20 +1509,20 @@ carve::mesh::MeshSet<3> *carve::csg::CSG::compute(carve::mesh::MeshSet<3> *a,
|
||||
classifyFaceGroups(shared_edges,
|
||||
vclass,
|
||||
a,
|
||||
a_rtree,
|
||||
a_rtree.get(),
|
||||
a_loops_grouped,
|
||||
a_edge_map,
|
||||
b,
|
||||
b_rtree,
|
||||
b_rtree.get(),
|
||||
b_loops_grouped,
|
||||
b_edge_map,
|
||||
collector);
|
||||
break;
|
||||
}
|
||||
|
||||
carve::mesh::MeshSet<3> *result = collector.done(hooks);
|
||||
meshset_t *result = collector.done(hooks);
|
||||
if (result != NULL && shared_edges_ptr != NULL) {
|
||||
std::list<carve::mesh::MeshSet<3> *> result_list;
|
||||
std::list<meshset_t *> result_list;
|
||||
result_list.push_back(result);
|
||||
returnSharedEdges(shared_edges, result_list, shared_edges_ptr);
|
||||
}
|
||||
@ -1492,15 +1543,15 @@ carve::mesh::MeshSet<3> *carve::csg::CSG::compute(carve::mesh::MeshSet<3> *a,
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
carve::mesh::MeshSet<3> *carve::csg::CSG::compute(carve::mesh::MeshSet<3> *a,
|
||||
carve::mesh::MeshSet<3> *b,
|
||||
carve::mesh::MeshSet<3> *carve::csg::CSG::compute(meshset_t *a,
|
||||
meshset_t *b,
|
||||
carve::csg::CSG::OP op,
|
||||
carve::csg::V2Set *shared_edges,
|
||||
CLASSIFY_TYPE classify_type) {
|
||||
Collector *coll = makeCollector(op, a, b);
|
||||
if (!coll) return NULL;
|
||||
|
||||
carve::mesh::MeshSet<3> *result = compute(a, b, *coll, shared_edges, classify_type);
|
||||
meshset_t *result = compute(a, b, *coll, shared_edges, classify_type);
|
||||
|
||||
delete coll;
|
||||
|
||||
@ -1521,9 +1572,9 @@ carve::mesh::MeshSet<3> *carve::csg::CSG::compute(carve::mesh::MeshSet<3> *a,
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
bool carve::csg::CSG::sliceAndClassify(carve::mesh::MeshSet<3> *closed,
|
||||
carve::mesh::MeshSet<3> *open,
|
||||
std::list<std::pair<FaceClass, carve::mesh::MeshSet<3> *> > &result,
|
||||
bool carve::csg::CSG::sliceAndClassify(meshset_t *closed,
|
||||
meshset_t *open,
|
||||
std::list<std::pair<FaceClass, meshset_t *> > &result,
|
||||
carve::csg::V2Set *shared_edges_ptr) {
|
||||
if (!closed->isClosed()) return false;
|
||||
carve::csg::VertexClassification vclass;
|
||||
@ -1538,10 +1589,10 @@ bool carve::csg::CSG::sliceAndClassify(carve::mesh::MeshSet<3> *closed,
|
||||
size_t a_edge_count;
|
||||
size_t b_edge_count;
|
||||
|
||||
face_rtree_t *closed_rtree = face_rtree_t::construct_STR(closed->faceBegin(), closed->faceEnd(), 4, 4);
|
||||
face_rtree_t *open_rtree = face_rtree_t::construct_STR(open->faceBegin(), open->faceEnd(), 4, 4);
|
||||
std::auto_ptr<face_rtree_t> closed_rtree(face_rtree_t::construct_STR(closed->faceBegin(), closed->faceEnd(), 4, 4));
|
||||
std::auto_ptr<face_rtree_t> open_rtree(face_rtree_t::construct_STR(open->faceBegin(), open->faceEnd(), 4, 4));
|
||||
|
||||
calc(closed, closed_rtree, open, open_rtree, vclass, eclass,a_face_loops, b_face_loops, a_edge_count, b_edge_count);
|
||||
calc(closed, closed_rtree.get(), open, open_rtree.get(), vclass, eclass,a_face_loops, b_face_loops, a_edge_count, b_edge_count);
|
||||
|
||||
detail::LoopEdges a_edge_map;
|
||||
detail::LoopEdges b_edge_map;
|
||||
@ -1559,18 +1610,18 @@ bool carve::csg::CSG::sliceAndClassify(carve::mesh::MeshSet<3> *closed,
|
||||
halfClassifyFaceGroups(shared_edges,
|
||||
vclass,
|
||||
closed,
|
||||
closed_rtree,
|
||||
closed_rtree.get(),
|
||||
a_loops_grouped,
|
||||
a_edge_map,
|
||||
open,
|
||||
open_rtree,
|
||||
open_rtree.get(),
|
||||
b_loops_grouped,
|
||||
b_edge_map,
|
||||
result);
|
||||
|
||||
if (shared_edges_ptr != NULL) {
|
||||
std::list<carve::mesh::MeshSet<3> *> result_list;
|
||||
for (std::list<std::pair<FaceClass, carve::mesh::MeshSet<3> *> >::iterator it = result.begin(); it != result.end(); it++) {
|
||||
std::list<meshset_t *> result_list;
|
||||
for (std::list<std::pair<FaceClass, meshset_t *> >::iterator it = result.begin(); it != result.end(); it++) {
|
||||
result_list.push_back(it->second);
|
||||
}
|
||||
returnSharedEdges(shared_edges, result_list, shared_edges_ptr);
|
||||
@ -1590,10 +1641,10 @@ bool carve::csg::CSG::sliceAndClassify(carve::mesh::MeshSet<3> *closed,
|
||||
* @param hooks
|
||||
* @param shared_edges_ptr
|
||||
*/
|
||||
void carve::csg::CSG::slice(carve::mesh::MeshSet<3> *a,
|
||||
carve::mesh::MeshSet<3> *b,
|
||||
std::list<carve::mesh::MeshSet<3> *> &a_sliced,
|
||||
std::list<carve::mesh::MeshSet<3> *> &b_sliced,
|
||||
void carve::csg::CSG::slice(meshset_t *a,
|
||||
meshset_t *b,
|
||||
std::list<meshset_t *> &a_sliced,
|
||||
std::list<meshset_t *> &b_sliced,
|
||||
carve::csg::V2Set *shared_edges_ptr) {
|
||||
carve::csg::VertexClassification vclass;
|
||||
carve::csg::EdgeClassification eclass;
|
||||
@ -1607,10 +1658,10 @@ void carve::csg::CSG::slice(carve::mesh::MeshSet<3> *a,
|
||||
size_t a_edge_count;
|
||||
size_t b_edge_count;
|
||||
|
||||
face_rtree_t *a_rtree = face_rtree_t::construct_STR(a->faceBegin(), a->faceEnd(), 4, 4);
|
||||
face_rtree_t *b_rtree = face_rtree_t::construct_STR(b->faceBegin(), b->faceEnd(), 4, 4);
|
||||
std::auto_ptr<face_rtree_t> a_rtree(face_rtree_t::construct_STR(a->faceBegin(), a->faceEnd(), 4, 4));
|
||||
std::auto_ptr<face_rtree_t> b_rtree(face_rtree_t::construct_STR(b->faceBegin(), b->faceEnd(), 4, 4));
|
||||
|
||||
calc(a, a_rtree, b, b_rtree, vclass, eclass,a_face_loops, b_face_loops, a_edge_count, b_edge_count);
|
||||
calc(a, a_rtree.get(), b, b_rtree.get(), vclass, eclass,a_face_loops, b_face_loops, a_edge_count, b_edge_count);
|
||||
|
||||
detail::LoopEdges a_edge_map;
|
||||
detail::LoopEdges b_edge_map;
|
||||
@ -1645,7 +1696,7 @@ void carve::csg::CSG::slice(carve::mesh::MeshSet<3> *a,
|
||||
delete all;
|
||||
}
|
||||
if (shared_edges_ptr != NULL) {
|
||||
std::list<carve::mesh::MeshSet<3> *> result_list;
|
||||
std::list<meshset_t *> result_list;
|
||||
result_list.insert(result_list.end(), a_sliced.begin(), a_sliced.end());
|
||||
result_list.insert(result_list.end(), b_sliced.begin(), b_sliced.end());
|
||||
returnSharedEdges(shared_edges, result_list, shared_edges_ptr);
|
||||
|
6
extern/carve/patches/strict_flags.patch
vendored
6
extern/carve/patches/strict_flags.patch
vendored
@ -9,9 +9,9 @@ diff -r 47dfdaff1dd5 include/carve/csg_triangulator.hpp
|
||||
}
|
||||
|
||||
carve::mesh::MeshSet<3>::face_t *mergeQuad(edge_map_t::iterator i, edge_map_t &edge_map) {
|
||||
diff -r 47dfdaff1dd5 src/selfintersect.cpp
|
||||
--- a/src/selfintersect.cpp Thu Jan 12 15:49:04 2012 -0500
|
||||
+++ b/src/selfintersect.cpp Fri Jan 13 03:13:32 2012 +0600
|
||||
diff -r 47dfdaff1dd5 lib/selfintersect.cpp
|
||||
--- a/lib/selfintersect.cpp Thu Jan 12 15:49:04 2012 -0500
|
||||
+++ b/lib/selfintersect.cpp Fri Jan 13 03:13:32 2012 +0600
|
||||
@@ -465,6 +465,7 @@
|
||||
|
||||
// returns true if no intersection, based upon edge^a_i and edge^b_j separating axis.
|
||||
|
@ -143,7 +143,9 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
|
||||
|
||||
cls.min_bounces = IntProperty(
|
||||
name="Min Bounces",
|
||||
description="Minimum number of bounces, setting this lower than the maximum enables probalistic path termination (faster but noisier)",
|
||||
description="Minimum number of bounces, setting this lower "
|
||||
"than the maximum enables probabilistic path "
|
||||
"termination (faster but noisier)",
|
||||
min=0, max=1024,
|
||||
default=3,
|
||||
)
|
||||
@ -175,7 +177,10 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
|
||||
|
||||
cls.transparent_min_bounces = IntProperty(
|
||||
name="Transparent Min Bounces",
|
||||
description="Minimum number of transparent bounces, setting this lower than the maximum enables probalistic path termination (faster but noisier)",
|
||||
description="Minimum number of transparent bounces, setting "
|
||||
"this lower than the maximum enables "
|
||||
"probabilistic path termination (faster but "
|
||||
"noisier)",
|
||||
min=0, max=1024,
|
||||
default=8,
|
||||
)
|
||||
|
@ -395,7 +395,7 @@ void GHOST_NDOFManager::setDeadZone(float dz)
|
||||
dz = 0.f;
|
||||
}
|
||||
else if (dz > 0.5f) {
|
||||
// warn the rogue user/programmer, but allow it
|
||||
// warn the rogue user/developer, but allow it
|
||||
GHOST_PRINTF("ndof: dead zone of %.2f is rather high...\n", dz);
|
||||
}
|
||||
m_deadZone = dz;
|
||||
|
@ -38,6 +38,7 @@ dict_uimsgs = {
|
||||
"betweens", # yuck! in-betweens!
|
||||
"boolean", "booleans",
|
||||
"decrement",
|
||||
"derivate",
|
||||
"doesn", # doesn't
|
||||
"fader",
|
||||
"hoc", # ad-hoc
|
||||
@ -88,7 +89,7 @@ dict_uimsgs = {
|
||||
"fullscreen",
|
||||
"gridline",
|
||||
"hemi",
|
||||
"inscatter",
|
||||
"inscatter", "inscattering",
|
||||
"lightless",
|
||||
"lookup", "lookups",
|
||||
"mathutils",
|
||||
@ -161,6 +162,7 @@ dict_uimsgs = {
|
||||
"unspill",
|
||||
"unstitchable",
|
||||
"vectorscope",
|
||||
"whitespace", "whitespaces",
|
||||
"worldspace",
|
||||
"workflow",
|
||||
|
||||
@ -182,6 +184,7 @@ dict_uimsgs = {
|
||||
"polygonization",
|
||||
"selectability",
|
||||
"slurph",
|
||||
"stitchable",
|
||||
"trackability",
|
||||
"transmissivity",
|
||||
"rasterized", "rasterization",
|
||||
@ -332,6 +335,7 @@ dict_uimsgs = {
|
||||
"dupligroup",
|
||||
"duplivert",
|
||||
"editbone",
|
||||
"editmode",
|
||||
"fcurve", "fcurves",
|
||||
"fluidsim",
|
||||
"frameserver",
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
"""
|
||||
This module contains utility functions specific to blender but
|
||||
not assosiated with blenders internal data.
|
||||
not associated with blenders internal data.
|
||||
"""
|
||||
|
||||
__all__ = (
|
||||
|
@ -19,7 +19,7 @@
|
||||
# <pep8-80 compliant>
|
||||
|
||||
"""
|
||||
Utility modules assosiated with the bpy module.
|
||||
Utility modules associated with the bpy module.
|
||||
"""
|
||||
|
||||
__all__ = (
|
||||
|
@ -120,7 +120,7 @@ class RandomizeLocRotSize(Operator):
|
||||
)
|
||||
loc = FloatVectorProperty(
|
||||
name="Location",
|
||||
description=("Maximun distance the objects "
|
||||
description=("Maximum distance the objects "
|
||||
"can spread over each axis"),
|
||||
min=-100.0,
|
||||
max=100.0,
|
||||
@ -134,7 +134,7 @@ class RandomizeLocRotSize(Operator):
|
||||
)
|
||||
rot = FloatVectorProperty(
|
||||
name="Rotation",
|
||||
description="Maximun rotation over each axis",
|
||||
description="Maximum rotation over each axis",
|
||||
min=-3.141592, # math.pi
|
||||
max=+3.141592,
|
||||
default=(0.0, 0.0, 0.0),
|
||||
|
@ -232,7 +232,7 @@ class FollowActiveQuads(Operator):
|
||||
mode = bpy.props.EnumProperty(
|
||||
name="Edge Length Mode",
|
||||
description="Method to space UV edge loops",
|
||||
items=(('EVEN', "Even", "Space all UVs evently"),
|
||||
items=(('EVEN', "Even", "Space all UVs evenly"),
|
||||
('LENGTH', "Length", "Average space UVs edge length of each loop")),
|
||||
default='LENGTH',
|
||||
)
|
||||
|
@ -561,7 +561,7 @@ class LightMapPack(Operator):
|
||||
|
||||
PREF_CONTEXT = bpy.props.EnumProperty(
|
||||
name="Selection",
|
||||
items=(('SEL_FACES', "Selected Faces", "Space all UVs evently"),
|
||||
items=(('SEL_FACES', "Selected Faces", "Space all UVs evenly"),
|
||||
('ALL_FACES', "All Faces", "Average space UVs edge length of each loop"),
|
||||
('ALL_OBJECTS', "Selected Mesh Object", "Average space UVs edge length of each loop")
|
||||
),
|
||||
|
@ -227,10 +227,10 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
|
||||
col.label(text="Use Scene Size Units", icon='SCENE_DATA')
|
||||
sub = col.column()
|
||||
sub.enabled = False
|
||||
sub.prop(fluid, "simulation_scale", text="Metres")
|
||||
sub.prop(fluid, "simulation_scale", text="Meters")
|
||||
else:
|
||||
col.label(text="Real World Size:")
|
||||
col.prop(fluid, "simulation_scale", text="Metres")
|
||||
col.prop(fluid, "simulation_scale", text="Meters")
|
||||
|
||||
col = split.column()
|
||||
col.label(text="Viscosity Presets:")
|
||||
|
@ -345,6 +345,7 @@ void modifiers_clearErrors(struct Object *ob);
|
||||
int modifiers_getCageIndex(struct Scene *scene, struct Object *ob,
|
||||
int *lastPossibleCageIndex_r, int virtual_);
|
||||
|
||||
int modifiers_isModifierEnabled(struct Object *ob, int modifierType);
|
||||
int modifiers_isSoftbodyEnabled(struct Object *ob);
|
||||
int modifiers_isClothEnabled(struct Object *ob);
|
||||
int modifiers_isParticleEnabled(struct Object *ob);
|
||||
|
@ -559,7 +559,11 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
|
||||
|
||||
/* softbody collision */
|
||||
if ((ob->type == OB_MESH) || (ob->type == OB_CURVE) || (ob->type == OB_LATTICE)) {
|
||||
if (modifiers_isSoftbodyEnabled(ob) || modifiers_isClothEnabled(ob) || ob->particlesystem.first)
|
||||
if (modifiers_isModifierEnabled(ob, eModifierType_Softbody)
|
||||
|| modifiers_isModifierEnabled(ob, eModifierType_Cloth)
|
||||
|| modifiers_isModifierEnabled(ob, eModifierType_Smoke)
|
||||
|| modifiers_isModifierEnabled(ob, eModifierType_DynamicPaint)
|
||||
|| ob->particlesystem.first)
|
||||
dag_add_collision_field_relation(dag, scene, ob, node); /* TODO: use effectorweight->group */
|
||||
}
|
||||
|
||||
|
@ -2153,7 +2153,7 @@ void BKE_mesh_convert_mfaces_to_mpolys_ex(ID *id, CustomData *fdata, CustomData
|
||||
}
|
||||
}
|
||||
|
||||
/* note, we don't convert FGons at all, these are not even real ngons,
|
||||
/* note, we don't convert NGons at all, these are not even real ngons,
|
||||
* they have their own UV's, colors etc - its more an editing feature. */
|
||||
|
||||
BLI_edgehash_free(eh, NULL);
|
||||
|
@ -331,6 +331,13 @@ int modifiers_isClothEnabled(Object *ob)
|
||||
return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render));
|
||||
}
|
||||
|
||||
int modifiers_isModifierEnabled(Object *ob, int modifierType)
|
||||
{
|
||||
ModifierData *md = modifiers_findByType(ob, modifierType);
|
||||
|
||||
return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render));
|
||||
}
|
||||
|
||||
int modifiers_isParticleEnabled(Object *ob)
|
||||
{
|
||||
ModifierData *md = modifiers_findByType(ob, eModifierType_ParticleSystem);
|
||||
|
@ -1391,7 +1391,7 @@ static void BKE_nlastrip_validate_autoblends(NlaTrack *nlt, NlaStrip *nls)
|
||||
|
||||
/* set overlaps for this strip
|
||||
* - don't use the values obtained though if the end in question
|
||||
* is directly followed/preceeded by another strip, forming an
|
||||
* is directly followed/preceded by another strip, forming an
|
||||
* 'island' of continuous strips
|
||||
*/
|
||||
if ((ps || ns) && ((nls->prev == NULL) || IS_EQF(nls->prev->end, nls->start) == 0)) {
|
||||
|
@ -108,107 +108,107 @@ static struct bUnitCollection buDummyCollecton = {buDummyDef, 0, 0, sizeof(buDum
|
||||
|
||||
/* Lengths */
|
||||
static struct bUnitDef buMetricLenDef[] = {
|
||||
{"kilometer", "kilometers", "km", NULL, "Kilometers", UN_SC_KM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"hectometer", "hectometers", "hm", NULL, "100 Meters", UN_SC_HM, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"dekameter", "dekameters", "dam",NULL, "10 Meters", UN_SC_DAM, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"meter", "meters", "m", NULL, "Meters", UN_SC_M, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"decimetre", "decimetres", "dm", NULL, "10 Centimeters", UN_SC_DM, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"centimeter", "centimeters", "cm", NULL, "Centimeters", UN_SC_CM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"millimeter", "millimeters", "mm", NULL, "Millimeters", UN_SC_MM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"micrometer", "micrometers", "µm", "um", "Micrometers", UN_SC_UM, 0.0, B_UNIT_DEF_NONE}, // micron too?
|
||||
{"kilometer", "kilometers", "km", NULL, "Kilometers", UN_SC_KM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"hectometer", "hectometers", "hm", NULL, "100 Meters", UN_SC_HM, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"dekameter", "dekameters", "dam", NULL, "10 Meters", UN_SC_DAM, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"meter", "meters", "m", NULL, "Meters", UN_SC_M, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"decimeter", "decimeters", "dm", NULL, "10 Centimeters", UN_SC_DM, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"centimeter", "centimeters", "cm", NULL, "Centimeters", UN_SC_CM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"millimeter", "millimeters", "mm", NULL, "Millimeters", UN_SC_MM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"micrometer", "micrometers", "µm", "um", "Micrometers", UN_SC_UM, 0.0, B_UNIT_DEF_NONE}, // micron too?
|
||||
|
||||
/* These get displayed because of float precision problems in the transform header,
|
||||
* could work around, but for now probably people wont use these */
|
||||
#if 0
|
||||
{"nanometer", "Nanometers", "nm", NULL, 0.000000001, 0.0, B_UNIT_DEF_NONE},
|
||||
{"picometer", "Picometers", "pm", NULL, 0.000000000001, 0.0,B_UNIT_DEF_NONE},
|
||||
{"nanometer", "Nanometers", "nm", NULL, 0.000000001, 0.0, B_UNIT_DEF_NONE},
|
||||
{"picometer", "Picometers", "pm", NULL, 0.000000000001, 0.0, B_UNIT_DEF_NONE},
|
||||
#endif
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
};
|
||||
static struct bUnitCollection buMetricLenCollecton = {buMetricLenDef, 3, 0, sizeof(buMetricLenDef) / sizeof(bUnitDef)};
|
||||
|
||||
static struct bUnitDef buImperialLenDef[] = {
|
||||
{"mile", "miles", "mi", "m", "Miles", UN_SC_MI, 0.0, B_UNIT_DEF_NONE},
|
||||
{"furlong", "furlongs", "fur", NULL, "Furlongs",UN_SC_FUR, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"chain", "chains", "ch", NULL, "Chains", UN_SC_CH, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"yard", "yards", "yd", NULL, "Yards", UN_SC_YD, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"foot", "feet", "'", "ft", "Feet", UN_SC_FT, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"inch", "inches", "\"", "in", "Inches", UN_SC_IN, 0.0, B_UNIT_DEF_NONE},
|
||||
{"thou", "thou", "thou", "mil", "Thou", UN_SC_MIL, 0.0, B_UNIT_DEF_NONE}, /* plural for thou has no 's' */
|
||||
{"mile", "miles", "mi", "m", "Miles", UN_SC_MI, 0.0, B_UNIT_DEF_NONE},
|
||||
{"furlong", "furlongs", "fur", NULL, "Furlongs", UN_SC_FUR, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"chain", "chains", "ch", NULL, "Chains", UN_SC_CH, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"yard", "yards", "yd", NULL, "Yards", UN_SC_YD, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"foot", "feet", "'", "ft", "Feet", UN_SC_FT, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"inch", "inches", "\"", "in", "Inches", UN_SC_IN, 0.0, B_UNIT_DEF_NONE},
|
||||
{"thou", "thou", "thou", "mil", "Thou", UN_SC_MIL, 0.0, B_UNIT_DEF_NONE}, /* plural for thou has no 's' */
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
};
|
||||
static struct bUnitCollection buImperialLenCollecton = {buImperialLenDef, 4, 0, sizeof(buImperialLenDef) / sizeof(bUnitDef)};
|
||||
|
||||
/* Areas */
|
||||
static struct bUnitDef buMetricAreaDef[] = {
|
||||
{"square kilometer", "square kilometers", "km²", "km2", "Square Kilometers", UN_SC_KM*UN_SC_KM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"square hectometer","square hectometers", "hm²", "hm2", "Square Hectometers", UN_SC_HM*UN_SC_HM, 0.0, B_UNIT_DEF_NONE}, /* hectare */
|
||||
{"square dekameter", "square dekameters", "dam²","dam2", "Square Dekameters", UN_SC_DAM*UN_SC_DAM, 0.0, B_UNIT_DEF_SUPPRESS}, /* are */
|
||||
{"square meter", "square meters", "m²", "m2", "Square Meters", UN_SC_M*UN_SC_M, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"square decimetre", "square decimetres", "dm²", "dm2", "Square Decimetres", UN_SC_DM*UN_SC_DM, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"square centimeter", "square centimeters", "cm²", "cm2", "Square Centimeters", UN_SC_CM*UN_SC_CM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"square millimeter", "square millimeters", "mm²", "mm2", "Square Millimeters", UN_SC_MM*UN_SC_MM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"square micrometer", "square micrometers", "µm²", "um2", "Square Micrometers", UN_SC_UM*UN_SC_UM, 0.0, B_UNIT_DEF_NONE},
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
{"square kilometer", "square kilometers", "km²", "km2", "Square Kilometers", UN_SC_KM * UN_SC_KM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"square hectometer", "square hectometers", "hm²", "hm2", "Square Hectometers", UN_SC_HM * UN_SC_HM, 0.0, B_UNIT_DEF_NONE}, /* hectare */
|
||||
{"square dekameter", "square dekameters", "dam²", "dam2", "Square Dekameters", UN_SC_DAM * UN_SC_DAM, 0.0, B_UNIT_DEF_SUPPRESS}, /* are */
|
||||
{"square meter", "square meters", "m²", "m2", "Square Meters", UN_SC_M * UN_SC_M, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"square decimeter", "square decimetees", "dm²", "dm2", "Square Decimeters", UN_SC_DM * UN_SC_DM, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"square centimeter", "square centimeters", "cm²", "cm2", "Square Centimeters", UN_SC_CM * UN_SC_CM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"square millimeter", "square millimeters", "mm²", "mm2", "Square Millimeters", UN_SC_MM * UN_SC_MM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"square micrometer", "square micrometers", "µm²", "um2", "Square Micrometers", UN_SC_UM * UN_SC_UM, 0.0, B_UNIT_DEF_NONE},
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
};
|
||||
static struct bUnitCollection buMetricAreaCollecton = {buMetricAreaDef, 3, 0, sizeof(buMetricAreaDef) / sizeof(bUnitDef)};
|
||||
|
||||
static struct bUnitDef buImperialAreaDef[] = {
|
||||
{"square mile", "square miles", "sq mi", "sq m","Square Miles", UN_SC_MI*UN_SC_MI, 0.0, B_UNIT_DEF_NONE},
|
||||
{"square furlong", "square furlongs", "sq fur",NULL, "Square Furlongs", UN_SC_FUR*UN_SC_FUR, 0.0,B_UNIT_DEF_SUPPRESS},
|
||||
{"square chain", "square chains", "sq ch", NULL, "Square Chains", UN_SC_CH*UN_SC_CH, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"square yard", "square yards", "sq yd", NULL, "Square Yards", UN_SC_YD*UN_SC_YD, 0.0, B_UNIT_DEF_NONE},
|
||||
{"square foot", "square feet", "sq ft", NULL, "Square Feet", UN_SC_FT*UN_SC_FT, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"square inch", "square inches", "sq in", NULL, "Square Inches", UN_SC_IN*UN_SC_IN, 0.0, B_UNIT_DEF_NONE},
|
||||
{"square thou", "square thous", "sq mil",NULL, "Square Thous", UN_SC_MIL*UN_SC_MIL, 0.0, B_UNIT_DEF_NONE},
|
||||
{"square mile", "square miles", "sq mi", "sq m", "Square Miles", UN_SC_MI * UN_SC_MI, 0.0, B_UNIT_DEF_NONE},
|
||||
{"square furlong", "square furlongs", "sq fur", NULL, "Square Furlongs", UN_SC_FUR * UN_SC_FUR, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"square chain", "square chains", "sq ch", NULL, "Square Chains", UN_SC_CH * UN_SC_CH, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"square yard", "square yards", "sq yd", NULL, "Square Yards", UN_SC_YD * UN_SC_YD, 0.0, B_UNIT_DEF_NONE},
|
||||
{"square foot", "square feet", "sq ft", NULL, "Square Feet", UN_SC_FT * UN_SC_FT, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"square inch", "square inches", "sq in", NULL, "Square Inches", UN_SC_IN * UN_SC_IN, 0.0, B_UNIT_DEF_NONE},
|
||||
{"square thou", "square thous", "sq mil", NULL, "Square Thous", UN_SC_MIL * UN_SC_MIL, 0.0, B_UNIT_DEF_NONE},
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
};
|
||||
static struct bUnitCollection buImperialAreaCollecton = {buImperialAreaDef, 4, 0, sizeof(buImperialAreaDef) / sizeof(bUnitDef)};
|
||||
|
||||
/* Volumes */
|
||||
static struct bUnitDef buMetricVolDef[] = {
|
||||
{"cubic kilometer", "cubic kilometers", "km³", "km3", "Cubic Kilometers", UN_SC_KM*UN_SC_KM*UN_SC_KM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"cubic hectometer","cubic hectometers", "hm³", "hm3", "Cubic Hectometers", UN_SC_HM*UN_SC_HM*UN_SC_HM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"cubic dekameter", "cubic dekameters", "dam³","dam3", "Cubic Dekameters", UN_SC_DAM*UN_SC_DAM*UN_SC_DAM, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"cubic meter", "cubic meters", "m³", "m3", "Cubic Meters", UN_SC_M*UN_SC_M*UN_SC_M, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"cubic decimetre", "cubic decimetres", "dm³", "dm3", "Cubic Decimetres", UN_SC_DM*UN_SC_DM*UN_SC_DM, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"cubic centimeter", "cubic centimeters", "cm³", "cm3", "Cubic Centimeters", UN_SC_CM*UN_SC_CM*UN_SC_CM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"cubic millimeter", "cubic millimeters", "mm³", "mm3", "Cubic Millimeters", UN_SC_MM*UN_SC_MM*UN_SC_MM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"cubic micrometer", "cubic micrometers", "µm³", "um3", "Cubic Micrometers", UN_SC_UM*UN_SC_UM*UN_SC_UM, 0.0, B_UNIT_DEF_NONE},
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
{"cubic kilometer", "cubic kilometers", "km³", "km3", "Cubic Kilometers", UN_SC_KM * UN_SC_KM * UN_SC_KM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"cubic hectometer", "cubic hectometers", "hm³", "hm3", "Cubic Hectometers", UN_SC_HM * UN_SC_HM * UN_SC_HM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"cubic dekameter", "cubic dekameters", "dam³", "dam3", "Cubic Dekameters", UN_SC_DAM * UN_SC_DAM * UN_SC_DAM, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"cubic meter", "cubic meters", "m³", "m3", "Cubic Meters", UN_SC_M * UN_SC_M * UN_SC_M, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"cubic decimeter", "cubic decimeters", "dm³", "dm3", "Cubic Decimeters", UN_SC_DM * UN_SC_DM * UN_SC_DM, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"cubic centimeter", "cubic centimeters", "cm³", "cm3", "Cubic Centimeters", UN_SC_CM * UN_SC_CM * UN_SC_CM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"cubic millimeter", "cubic millimeters", "mm³", "mm3", "Cubic Millimeters", UN_SC_MM * UN_SC_MM * UN_SC_MM, 0.0, B_UNIT_DEF_NONE},
|
||||
{"cubic micrometer", "cubic micrometers", "µm³", "um3", "Cubic Micrometers", UN_SC_UM * UN_SC_UM * UN_SC_UM, 0.0, B_UNIT_DEF_NONE},
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
};
|
||||
static struct bUnitCollection buMetricVolCollecton = {buMetricVolDef, 3, 0, sizeof(buMetricVolDef) / sizeof(bUnitDef)};
|
||||
|
||||
static struct bUnitDef buImperialVolDef[] = {
|
||||
{"cubic mile", "cubic miles", "cu mi", "cu m","Cubic Miles", UN_SC_MI*UN_SC_MI*UN_SC_MI, 0.0, B_UNIT_DEF_NONE},
|
||||
{"cubic furlong", "cubic furlongs", "cu fur",NULL, "Cubic Furlongs", UN_SC_FUR*UN_SC_FUR*UN_SC_FUR, 0.0,B_UNIT_DEF_SUPPRESS},
|
||||
{"cubic chain", "cubic chains", "cu ch", NULL, "Cubic Chains", UN_SC_CH*UN_SC_CH*UN_SC_CH, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"cubic yard", "cubic yards", "cu yd", NULL, "Cubic Yards", UN_SC_YD*UN_SC_YD*UN_SC_YD, 0.0, B_UNIT_DEF_NONE},
|
||||
{"cubic foot", "cubic feet", "cu ft", NULL, "Cubic Feet", UN_SC_FT*UN_SC_FT*UN_SC_FT, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"cubic inch", "cubic inches", "cu in", NULL, "Cubic Inches", UN_SC_IN*UN_SC_IN*UN_SC_IN, 0.0, B_UNIT_DEF_NONE},
|
||||
{"cubic thou", "cubic thous", "cu mil",NULL, "Cubic Thous", UN_SC_MIL*UN_SC_MIL*UN_SC_MIL, 0.0, B_UNIT_DEF_NONE},
|
||||
{"cubic mile", "cubic miles", "cu mi", "cu m", "Cubic Miles", UN_SC_MI * UN_SC_MI * UN_SC_MI, 0.0, B_UNIT_DEF_NONE},
|
||||
{"cubic furlong", "cubic furlongs", "cu fur", NULL, "Cubic Furlongs", UN_SC_FUR * UN_SC_FUR * UN_SC_FUR, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"cubic chain", "cubic chains", "cu ch", NULL, "Cubic Chains", UN_SC_CH * UN_SC_CH * UN_SC_CH, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"cubic yard", "cubic yards", "cu yd", NULL, "Cubic Yards", UN_SC_YD * UN_SC_YD * UN_SC_YD, 0.0, B_UNIT_DEF_NONE},
|
||||
{"cubic foot", "cubic feet", "cu ft", NULL, "Cubic Feet", UN_SC_FT * UN_SC_FT * UN_SC_FT, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"cubic inch", "cubic inches", "cu in", NULL , "Cubic Inches", UN_SC_IN * UN_SC_IN * UN_SC_IN, 0.0, B_UNIT_DEF_NONE},
|
||||
{"cubic thou", "cubic thous", "cu mil", NULL, "Cubic Thous", UN_SC_MIL * UN_SC_MIL * UN_SC_MIL, 0.0, B_UNIT_DEF_NONE},
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
};
|
||||
static struct bUnitCollection buImperialVolCollecton = {buImperialVolDef, 4, 0, sizeof(buImperialVolDef) / sizeof(bUnitDef)};
|
||||
|
||||
/* Mass */
|
||||
static struct bUnitDef buMetricMassDef[] = {
|
||||
{"ton", "tonnes", "ton", "t", "1000 Kilograms", UN_SC_MTON, 0.0, B_UNIT_DEF_NONE},
|
||||
{"quintal", "quintals", "ql", "q", "100 Kilograms", UN_SC_QL, 0.0, B_UNIT_DEF_NONE},
|
||||
{"kilogram", "kilograms", "kg", NULL, "Kilograms", UN_SC_KG, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"hectogram", "hectograms", "hg", NULL, "Hectograms", UN_SC_HG, 0.0, B_UNIT_DEF_NONE},
|
||||
{"dekagram", "dekagrams", "dag",NULL, "10 Grams", UN_SC_DAG, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"gram", "grams", "g", NULL, "Grams", UN_SC_G, 0.0, B_UNIT_DEF_NONE},
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
{"ton", "tonnes", "ton", "t", "1000 Kilograms", UN_SC_MTON, 0.0, B_UNIT_DEF_NONE},
|
||||
{"quintal", "quintals", "ql", "q", "100 Kilograms", UN_SC_QL, 0.0, B_UNIT_DEF_NONE},
|
||||
{"kilogram", "kilograms", "kg", NULL, "Kilograms", UN_SC_KG, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"hectogram", "hectograms", "hg", NULL, "Hectograms", UN_SC_HG, 0.0, B_UNIT_DEF_NONE},
|
||||
{"dekagram", "dekagrams", "dag", NULL, "10 Grams", UN_SC_DAG, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{"gram", "grams", "g", NULL, "Grams", UN_SC_G, 0.0, B_UNIT_DEF_NONE},
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
};
|
||||
static struct bUnitCollection buMetricMassCollecton = {buMetricMassDef, 2, 0, sizeof(buMetricMassDef) / sizeof(bUnitDef)};
|
||||
|
||||
static struct bUnitDef buImperialMassDef[] = {
|
||||
{"ton", "tonnes", "ton", "t", "Tonnes", UN_SC_ITON, 0.0, B_UNIT_DEF_NONE},
|
||||
{"ton", "tonnes", "ton", "t", "Tonnes", UN_SC_ITON, 0.0, B_UNIT_DEF_NONE},
|
||||
{"centum weight", "centum weights", "cwt", NULL, "Centum weights", UN_SC_CWT, 0.0, B_UNIT_DEF_NONE},
|
||||
{"stone", "stones", "st", NULL, "Stones", UN_SC_ST, 0.0, B_UNIT_DEF_NONE},
|
||||
{"pound", "pounds", "lb", NULL, "Pounds", UN_SC_LB, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"ounce", "ounces", "oz", NULL, "Ounces", UN_SC_OZ, 0.0, B_UNIT_DEF_NONE},
|
||||
{"stone", "stones", "st", NULL, "Stones", UN_SC_ST, 0.0, B_UNIT_DEF_NONE},
|
||||
{"pound", "pounds", "lb", NULL, "Pounds", UN_SC_LB, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"ounce", "ounces", "oz", NULL, "Ounces", UN_SC_OZ, 0.0, B_UNIT_DEF_NONE},
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
};
|
||||
static struct bUnitCollection buImperialMassCollecton = {buImperialMassDef, 3, 0, sizeof(buImperialMassDef) / sizeof(bUnitDef)};
|
||||
@ -218,15 +218,15 @@ static struct bUnitCollection buImperialMassCollecton = {buImperialMassDef, 3, 0
|
||||
|
||||
/* Velocity */
|
||||
static struct bUnitDef buMetricVelDef[] = {
|
||||
{"meter per second", "meters per second", "m/s", NULL, "Meters per second", UN_SC_M, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"kilometer per hour", "kilometers per hour", "km/h", NULL, "Kilometers per hour", UN_SC_KM/3600.0f, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
{"meter per second", "meters per second", "m/s", NULL, "Meters per second", UN_SC_M, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"kilometer per hour", "kilometers per hour", "km/h", NULL, "Kilometers per hour", UN_SC_KM / 3600.0f, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
};
|
||||
static struct bUnitCollection buMetricVelCollecton = {buMetricVelDef, 0, 0, sizeof(buMetricVelDef) / sizeof(bUnitDef)};
|
||||
|
||||
static struct bUnitDef buImperialVelDef[] = {
|
||||
{"foot per second", "feet per second", "ft/s", "fps", "Feet per second", UN_SC_FT, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"mile per hour", "miles per hour", "mph", NULL, "Miles per hour", UN_SC_MI/3600.0f, 0.0,B_UNIT_DEF_SUPPRESS},
|
||||
{"foot per second", "feet per second", "ft/s", "fps", "Feet per second", UN_SC_FT, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"mile per hour", "miles per hour", "mph", NULL, "Miles per hour", UN_SC_MI / 3600.0f, 0.0, B_UNIT_DEF_SUPPRESS},
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
};
|
||||
static struct bUnitCollection buImperialVelCollecton = {buImperialVelDef, 0, 0, sizeof(buImperialVelDef) / sizeof(bUnitDef)};
|
||||
@ -234,7 +234,7 @@ static struct bUnitCollection buImperialVelCollecton = {buImperialVelDef, 0, 0,
|
||||
/* Acceleration */
|
||||
static struct bUnitDef buMetricAclDef[] = {
|
||||
{"meter per second squared", "meters per second squared", "m/s²", "m/s2", "Meters per second squared", UN_SC_M, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
};
|
||||
static struct bUnitCollection buMetricAclCollecton = {buMetricAclDef, 0, 0, sizeof(buMetricAclDef) / sizeof(bUnitDef)};
|
||||
|
||||
@ -247,12 +247,12 @@ static struct bUnitCollection buImperialAclCollecton = {buImperialAclDef, 0, 0,
|
||||
/* Time */
|
||||
static struct bUnitDef buNaturalTimeDef[] = {
|
||||
/* weeks? - probably not needed for blender */
|
||||
{"day", "days", "d", NULL, "Days", 90000.0, 0.0, B_UNIT_DEF_NONE},
|
||||
{"hour", "hours", "hr", "h", "Hours", 3600.0, 0.0, B_UNIT_DEF_NONE},
|
||||
{"minute", "minutes", "min", "m", "Minutes", 60.0, 0.0, B_UNIT_DEF_NONE},
|
||||
{"second", "seconds", "sec", "s", "Seconds", 1.0, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"millisecond", "milliseconds", "ms", NULL, "Milliseconds", 0.001, 0.0, B_UNIT_DEF_NONE},
|
||||
{"microsecond", "microseconds", "µs", "us", "Microseconds", 0.000001, 0.0, B_UNIT_DEF_NONE},
|
||||
{"day", "days", "d", NULL, "Days", 90000.0, 0.0, B_UNIT_DEF_NONE},
|
||||
{"hour", "hours", "hr", "h", "Hours", 3600.0, 0.0, B_UNIT_DEF_NONE},
|
||||
{"minute", "minutes", "min", "m", "Minutes", 60.0, 0.0, B_UNIT_DEF_NONE},
|
||||
{"second", "seconds", "sec", "s", "Seconds", 1.0, 0.0, B_UNIT_DEF_NONE}, /* base unit */
|
||||
{"millisecond", "milliseconds", "ms", NULL, "Milliseconds", 0.001, 0.0, B_UNIT_DEF_NONE},
|
||||
{"microsecond", "microseconds", "µs", "us", "Microseconds", 0.000001, 0.0, B_UNIT_DEF_NONE},
|
||||
{NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
|
||||
};
|
||||
static struct bUnitCollection buNaturalTimeCollecton = {buNaturalTimeDef, 3, 0, sizeof(buNaturalTimeDef) / sizeof(bUnitDef)};
|
||||
|
@ -1039,7 +1039,7 @@ static BMOpDefine bmo_bevel_def = {
|
||||
{BMO_OP_SLOT_BOOL, "use_dist"}, /* corner vert placement: evaluate percent as a distance,
|
||||
* modifier uses this. We could do this as another float setting */
|
||||
{BMO_OP_SLOT_INT, "lengthlayer"}, /* which PROP_FLT layer to us */
|
||||
{BMO_OP_SLOT_FLT, "percent"}, /* percentage to expand bevelled edge */
|
||||
{BMO_OP_SLOT_FLT, "percent"}, /* percentage to expand beveled edge */
|
||||
{0} /* null-terminating sentinel */},
|
||||
bmo_bevel_exec,
|
||||
BMO_OP_FLAG_UNTAN_MULTIRES
|
||||
|
@ -424,10 +424,10 @@ set(SRC
|
||||
operations/COM_PreviewOperation.cpp
|
||||
operations/COM_SplitViewerOperation.h
|
||||
operations/COM_SplitViewerOperation.cpp
|
||||
operations/COM_ConvertValueToColourProg.h
|
||||
operations/COM_ConvertValueToColourProg.cpp
|
||||
operations/COM_ConvertColourToValueProg.h
|
||||
operations/COM_ConvertColourToValueProg.cpp
|
||||
operations/COM_ConvertValueToColorProg.h
|
||||
operations/COM_ConvertValueToColorProg.cpp
|
||||
operations/COM_ConvertColorToValueProg.h
|
||||
operations/COM_ConvertColorToValueProg.cpp
|
||||
operations/COM_ConvertColorToBWOperation.h
|
||||
operations/COM_ConvertColorToBWOperation.cpp
|
||||
operations/COM_ConvertColorToVectorOperation.h
|
||||
|
@ -48,8 +48,8 @@
|
||||
#include "COM_CompositorNode.h"
|
||||
#include "COM_ConvertAlphaNode.h"
|
||||
#include "COM_ConvertColorToVectorOperation.h"
|
||||
#include "COM_ConvertColourToValueProg.h"
|
||||
#include "COM_ConvertValueToColourProg.h"
|
||||
#include "COM_ConvertColorToValueProg.h"
|
||||
#include "COM_ConvertValueToColorProg.h"
|
||||
#include "COM_ConvertValueToVectorOperation.h"
|
||||
#include "COM_ConvertVectorToColorOperation.h"
|
||||
#include "COM_ConvertVectorToValueOperation.h"
|
||||
@ -154,7 +154,7 @@ Node *Converter::convert(bNode *b_node, bool fast)
|
||||
node = new TextureNode(b_node);
|
||||
break;
|
||||
case CMP_NODE_RGBTOBW:
|
||||
node = new ColourToBWNode(b_node);
|
||||
node = new ColorToBWNode(b_node);
|
||||
break;
|
||||
case CMP_NODE_MIX_RGB:
|
||||
node = new MixNode(b_node);
|
||||
@ -396,13 +396,13 @@ void Converter::convertDataType(SocketConnection *connection, ExecutionSystem *s
|
||||
DataType toDatatype = inputSocket->getDataType();
|
||||
NodeOperation *converter = NULL;
|
||||
if (fromDatatype == COM_DT_VALUE && toDatatype == COM_DT_COLOR) {
|
||||
converter = new ConvertValueToColourProg();
|
||||
converter = new ConvertValueToColorProg();
|
||||
}
|
||||
else if (fromDatatype == COM_DT_VALUE && toDatatype == COM_DT_VECTOR) {
|
||||
converter = new ConvertValueToVectorOperation();
|
||||
}
|
||||
else if (fromDatatype == COM_DT_COLOR && toDatatype == COM_DT_VALUE) {
|
||||
converter = new ConvertColourToValueProg();
|
||||
converter = new ConvertColorToValueProg();
|
||||
}
|
||||
else if (fromDatatype == COM_DT_COLOR && toDatatype == COM_DT_VECTOR) {
|
||||
converter = new ConvertColorToVectorOperation();
|
||||
|
@ -35,6 +35,7 @@ void BilateralBlurNode::convertToOperations(ExecutionSystem *graph, CompositorCo
|
||||
{
|
||||
NodeBilateralBlurData *data = (NodeBilateralBlurData *)this->getbNode()->storage;
|
||||
BilateralBlurOperation *operation = new BilateralBlurOperation();
|
||||
operation->setbNode(this->getbNode());
|
||||
operation->setQuality(context->getQuality());
|
||||
operation->setData(data);
|
||||
this->getInputSocket(0)->relinkConnections(operation->getInputSocket(0), 0, graph);
|
||||
|
@ -25,18 +25,18 @@
|
||||
#include "COM_ConvertColorToBWOperation.h"
|
||||
#include "COM_ExecutionSystem.h"
|
||||
|
||||
ColourToBWNode::ColourToBWNode(bNode *editorNode) : Node(editorNode)
|
||||
ColorToBWNode::ColorToBWNode(bNode *editorNode) : Node(editorNode)
|
||||
{
|
||||
/* pass */
|
||||
}
|
||||
|
||||
void ColourToBWNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context)
|
||||
void ColorToBWNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context)
|
||||
{
|
||||
InputSocket *colourSocket = this->getInputSocket(0);
|
||||
InputSocket *colorSocket = this->getInputSocket(0);
|
||||
OutputSocket *valueSocket = this->getOutputSocket(0);
|
||||
|
||||
ConvertColorToBWOperation *convertProg = new ConvertColorToBWOperation();
|
||||
colourSocket->relinkConnections(convertProg->getInputSocket(0), 0, graph);
|
||||
colorSocket->relinkConnections(convertProg->getInputSocket(0), 0, graph);
|
||||
valueSocket->relinkConnections(convertProg->getOutputSocket(0));
|
||||
graph->addOperation(convertProg);
|
||||
}
|
||||
|
@ -20,18 +20,18 @@
|
||||
* Monique Dewanchand
|
||||
*/
|
||||
|
||||
#ifndef _COM_ColourToBWNode_h_
|
||||
#define _COM_ColourToBWNode_h_
|
||||
#ifndef _COM_ColorToBWNode_h_
|
||||
#define _COM_ColorToBWNode_h_
|
||||
|
||||
#include "COM_Node.h"
|
||||
#include "DNA_node_types.h"
|
||||
/**
|
||||
* @brief ColourToBWNode
|
||||
* @brief ColorToBWNode
|
||||
* @ingroup Node
|
||||
*/
|
||||
class ColourToBWNode : public Node {
|
||||
class ColorToBWNode : public Node {
|
||||
public:
|
||||
ColourToBWNode(bNode *editorNode);
|
||||
ColorToBWNode(bNode *editorNode);
|
||||
void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
|
||||
};
|
||||
#endif
|
||||
|
@ -34,12 +34,12 @@ void CompositorNode::convertToOperations(ExecutionSystem *graph, CompositorConte
|
||||
InputSocket *imageSocket = this->getInputSocket(0);
|
||||
InputSocket *alphaSocket = this->getInputSocket(1);
|
||||
if (imageSocket->isConnected()) {
|
||||
CompositorOperation *colourAlphaProg = new CompositorOperation();
|
||||
colourAlphaProg->setRenderData(context->getRenderData());
|
||||
colourAlphaProg->setbNodeTree(context->getbNodeTree());
|
||||
imageSocket->relinkConnections(colourAlphaProg->getInputSocket(0));
|
||||
alphaSocket->relinkConnections(colourAlphaProg->getInputSocket(1));
|
||||
graph->addOperation(colourAlphaProg);
|
||||
addPreviewOperation(graph, colourAlphaProg->getInputSocket(0));
|
||||
CompositorOperation *colorAlphaProg = new CompositorOperation();
|
||||
colorAlphaProg->setRenderData(context->getRenderData());
|
||||
colorAlphaProg->setbNodeTree(context->getbNodeTree());
|
||||
imageSocket->relinkConnections(colorAlphaProg->getInputSocket(0));
|
||||
alphaSocket->relinkConnections(colorAlphaProg->getInputSocket(1));
|
||||
graph->addOperation(colorAlphaProg);
|
||||
addPreviewOperation(graph, colorAlphaProg->getInputSocket(0));
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "COM_HueSaturationValueCorrectNode.h"
|
||||
|
||||
#include "COM_ConvertColourToValueProg.h"
|
||||
#include "COM_ConvertColorToValueProg.h"
|
||||
#include "COM_ExecutionSystem.h"
|
||||
#include "COM_ConvertRGBToHSVOperation.h"
|
||||
#include "COM_ConvertHSVToRGBOperation.h"
|
||||
@ -41,7 +41,7 @@ HueSaturationValueCorrectNode::HueSaturationValueCorrectNode(bNode *editorNode)
|
||||
void HueSaturationValueCorrectNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context)
|
||||
{
|
||||
InputSocket *valueSocket = this->getInputSocket(0);
|
||||
InputSocket *colourSocket = this->getInputSocket(1);
|
||||
InputSocket *colorSocket = this->getInputSocket(1);
|
||||
OutputSocket *outputSocket = this->getOutputSocket(0);
|
||||
bNode *editorsnode = getbNode();
|
||||
CurveMapping *storage = (CurveMapping *)editorsnode->storage;
|
||||
@ -51,7 +51,7 @@ void HueSaturationValueCorrectNode::convertToOperations(ExecutionSystem *graph,
|
||||
HueSaturationValueCorrectOperation *changeHSV = new HueSaturationValueCorrectOperation();
|
||||
MixBlendOperation *blend = new MixBlendOperation();
|
||||
|
||||
colourSocket->relinkConnections(rgbToHSV->getInputSocket(0), 1, graph);
|
||||
colorSocket->relinkConnections(rgbToHSV->getInputSocket(0), 1, graph);
|
||||
addLink(graph, rgbToHSV->getOutputSocket(), changeHSV->getInputSocket(0));
|
||||
addLink(graph, changeHSV->getOutputSocket(), hsvToRGB->getInputSocket(0));
|
||||
addLink(graph, hsvToRGB->getOutputSocket(), blend->getInputSocket(2));
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "COM_HueSaturationValueNode.h"
|
||||
|
||||
#include "COM_ConvertColourToValueProg.h"
|
||||
#include "COM_ConvertColorToValueProg.h"
|
||||
#include "COM_ExecutionSystem.h"
|
||||
#include "COM_ConvertRGBToHSVOperation.h"
|
||||
#include "COM_ConvertHSVToRGBOperation.h"
|
||||
@ -40,7 +40,7 @@ HueSaturationValueNode::HueSaturationValueNode(bNode *editorNode) : Node(editorN
|
||||
void HueSaturationValueNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context)
|
||||
{
|
||||
InputSocket *valueSocket = this->getInputSocket(0);
|
||||
InputSocket *colourSocket = this->getInputSocket(1);
|
||||
InputSocket *colorSocket = this->getInputSocket(1);
|
||||
OutputSocket *outputSocket = this->getOutputSocket(0);
|
||||
bNode *editorsnode = getbNode();
|
||||
NodeHueSat *storage = (NodeHueSat *)editorsnode->storage;
|
||||
@ -50,7 +50,7 @@ void HueSaturationValueNode::convertToOperations(ExecutionSystem *graph, Composi
|
||||
ChangeHSVOperation *changeHSV = new ChangeHSVOperation();
|
||||
MixBlendOperation *blend = new MixBlendOperation();
|
||||
|
||||
colourSocket->relinkConnections(rgbToHSV->getInputSocket(0), 0, graph);
|
||||
colorSocket->relinkConnections(rgbToHSV->getInputSocket(0), 0, graph);
|
||||
addLink(graph, rgbToHSV->getOutputSocket(), changeHSV->getInputSocket(0));
|
||||
addLink(graph, changeHSV->getOutputSocket(), hsvToRGB->getInputSocket(0));
|
||||
addLink(graph, hsvToRGB->getOutputSocket(), blend->getInputSocket(2));
|
||||
|
@ -32,12 +32,12 @@ MapValueNode::MapValueNode(bNode *editorNode) : Node(editorNode)
|
||||
|
||||
void MapValueNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context)
|
||||
{
|
||||
InputSocket *colourSocket = this->getInputSocket(0);
|
||||
InputSocket *colorSocket = this->getInputSocket(0);
|
||||
OutputSocket *valueSocket = this->getOutputSocket(0);
|
||||
TexMapping *storage = (TexMapping *)this->getbNode()->storage;
|
||||
MapValueOperation *convertProg = new MapValueOperation();
|
||||
convertProg->setSettings(storage);
|
||||
colourSocket->relinkConnections(convertProg->getInputSocket(0), 0, graph);
|
||||
colorSocket->relinkConnections(convertProg->getInputSocket(0), 0, graph);
|
||||
valueSocket->relinkConnections(convertProg->getOutputSocket(0));
|
||||
graph->addOperation(convertProg);
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ void RenderLayersNode::testSocketConnection(ExecutionSystem *system, int outputS
|
||||
|
||||
void RenderLayersNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context)
|
||||
{
|
||||
testSocketConnection(graph, 0, new RenderLayersColourProg());
|
||||
testSocketConnection(graph, 0, new RenderLayersColorProg());
|
||||
testSocketConnection(graph, 1, new RenderLayersAlphaProg());
|
||||
testSocketConnection(graph, 2, new RenderLayersDepthProg());
|
||||
testSocketConnection(graph, 3, new RenderLayersNormalOperation());
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class AlphaOverKeyOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class AlphaOverMixedOperation : public MixBaseOperation {
|
||||
private:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class AlphaOverPremultiplyOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ChangeHSVOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ChannelMatteOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ChromaMatteOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -25,8 +25,8 @@
|
||||
#include "COM_NodeOperation.h"
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ColorBalanceASCCDLOperation : public NodeOperation {
|
||||
protected:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ColorBalanceLGGOperation : public NodeOperation {
|
||||
protected:
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ColorMatteOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -25,8 +25,8 @@
|
||||
#include "COM_NodeOperation.h"
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ColorSpillOperation : public NodeOperation {
|
||||
protected:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertColorProfileOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertColorToBWOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -20,28 +20,28 @@
|
||||
* Monique Dewanchand
|
||||
*/
|
||||
|
||||
#include "COM_ConvertColourToValueProg.h"
|
||||
#include "COM_ConvertColorToValueProg.h"
|
||||
|
||||
ConvertColourToValueProg::ConvertColourToValueProg() : NodeOperation()
|
||||
ConvertColorToValueProg::ConvertColorToValueProg() : NodeOperation()
|
||||
{
|
||||
this->addInputSocket(COM_DT_COLOR);
|
||||
this->addOutputSocket(COM_DT_VALUE);
|
||||
this->m_inputOperation = NULL;
|
||||
}
|
||||
|
||||
void ConvertColourToValueProg::initExecution()
|
||||
void ConvertColorToValueProg::initExecution()
|
||||
{
|
||||
this->m_inputOperation = this->getInputSocketReader(0);
|
||||
}
|
||||
|
||||
void ConvertColourToValueProg::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
|
||||
void ConvertColorToValueProg::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
|
||||
{
|
||||
float inputColor[4];
|
||||
this->m_inputOperation->read(&inputColor[0], x, y, sampler, inputBuffers);
|
||||
outputValue[0] = (inputColor[0] + inputColor[1] + inputColor[2]) / 3.0f;
|
||||
}
|
||||
|
||||
void ConvertColourToValueProg::deinitExecution()
|
||||
void ConvertColorToValueProg::deinitExecution()
|
||||
{
|
||||
this->m_inputOperation = NULL;
|
||||
}
|
@ -20,16 +20,16 @@
|
||||
* Monique Dewanchand
|
||||
*/
|
||||
|
||||
#ifndef _COM_ConvertColourToValueProg_h
|
||||
#define _COM_ConvertColourToValueProg_h
|
||||
#ifndef _COM_ConvertColorToValueProg_h
|
||||
#define _COM_ConvertColorToValueProg_h
|
||||
#include "COM_NodeOperation.h"
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertColourToValueProg : public NodeOperation {
|
||||
class ConvertColorToValueProg : public NodeOperation {
|
||||
private:
|
||||
/**
|
||||
* Cached reference to the inputProgram
|
||||
@ -39,7 +39,7 @@ public:
|
||||
/**
|
||||
* Default constructor
|
||||
*/
|
||||
ConvertColourToValueProg();
|
||||
ConvertColorToValueProg();
|
||||
|
||||
/**
|
||||
* the inner loop of this program
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertColorToVectorOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -26,8 +26,8 @@
|
||||
#include "DNA_object_types.h"
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertDepthToRadiusOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertHSVToRGBOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertKeyToPremulOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertPremulToKeyOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertRGBToHSVOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertRGBToYCCOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertRGBToYUVOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -20,20 +20,20 @@
|
||||
* Monique Dewanchand
|
||||
*/
|
||||
|
||||
#include "COM_ConvertValueToColourProg.h"
|
||||
#include "COM_ConvertValueToColorProg.h"
|
||||
|
||||
ConvertValueToColourProg::ConvertValueToColourProg() : NodeOperation()
|
||||
ConvertValueToColorProg::ConvertValueToColorProg() : NodeOperation()
|
||||
{
|
||||
this->addInputSocket(COM_DT_VALUE);
|
||||
this->addOutputSocket(COM_DT_COLOR);
|
||||
this->m_inputProgram = NULL;
|
||||
}
|
||||
void ConvertValueToColourProg::initExecution()
|
||||
void ConvertValueToColorProg::initExecution()
|
||||
{
|
||||
this->m_inputProgram = this->getInputSocketReader(0);
|
||||
}
|
||||
|
||||
void ConvertValueToColourProg::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
|
||||
void ConvertValueToColorProg::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
|
||||
{
|
||||
float inputValue[4];
|
||||
this->m_inputProgram->read(inputValue, x, y, sampler, inputBuffers);
|
||||
@ -43,7 +43,7 @@ void ConvertValueToColourProg::executePixel(float *color, float x, float y, Pixe
|
||||
color[3] = 1.0f;
|
||||
}
|
||||
|
||||
void ConvertValueToColourProg::deinitExecution()
|
||||
void ConvertValueToColorProg::deinitExecution()
|
||||
{
|
||||
this->m_inputProgram = NULL;
|
||||
}
|
@ -20,19 +20,19 @@
|
||||
* Monique Dewanchand
|
||||
*/
|
||||
|
||||
#ifndef _COM_ConvertValueToColourProg_h
|
||||
#define _COM_ConvertValueToColourProg_h
|
||||
#ifndef _COM_ConvertValueToColorProg_h
|
||||
#define _COM_ConvertValueToColorProg_h
|
||||
#include "COM_NodeOperation.h"
|
||||
|
||||
|
||||
class ConvertValueToColourProg : public NodeOperation {
|
||||
class ConvertValueToColorProg : public NodeOperation {
|
||||
private:
|
||||
/**
|
||||
* Cached reference to the inputProgram
|
||||
*/
|
||||
SocketReader *m_inputProgram;
|
||||
public:
|
||||
ConvertValueToColourProg();
|
||||
ConvertValueToColorProg();
|
||||
|
||||
/**
|
||||
* the inner loop of this program
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertValueToVectorOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertVectorToColorOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertVectorToValueOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertYCCToRGBOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class ConvertYUVToRGBOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -49,7 +49,7 @@ void DifferenceMatteOperation::executePixel(float *outputValue, float x, float y
|
||||
float inColor1[4];
|
||||
float inColor2[4];
|
||||
|
||||
const float tolerence = this->m_settings->t1;
|
||||
const float tolerance = this->m_settings->t1;
|
||||
const float falloff = this->m_settings->t2;
|
||||
float difference;
|
||||
float alpha;
|
||||
@ -65,12 +65,12 @@ void DifferenceMatteOperation::executePixel(float *outputValue, float x, float y
|
||||
difference = difference / 3.0f;
|
||||
|
||||
/*make 100% transparent*/
|
||||
if (difference < tolerence) {
|
||||
if (difference < tolerance) {
|
||||
outputValue[0] = 0.0f;
|
||||
}
|
||||
/*in the falloff region, make partially transparent */
|
||||
else if (difference < falloff + tolerence) {
|
||||
difference = difference - tolerence;
|
||||
else if (difference < falloff + tolerance) {
|
||||
difference = difference - tolerance;
|
||||
alpha = difference / falloff;
|
||||
/*only change if more transparent than before */
|
||||
if (alpha < inColor1[3]) {
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class DifferenceMatteOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -49,7 +49,7 @@ void DistanceMatteOperation::executePixel(float *outputValue, float x, float y,
|
||||
float inKey[4];
|
||||
float inImage[4];
|
||||
|
||||
const float tolerence = this->m_settings->t1;
|
||||
const float tolerance = this->m_settings->t1;
|
||||
const float falloff = this->m_settings->t2;
|
||||
|
||||
float distance;
|
||||
@ -67,12 +67,12 @@ void DistanceMatteOperation::executePixel(float *outputValue, float x, float y,
|
||||
*/
|
||||
|
||||
/*make 100% transparent */
|
||||
if (distance < tolerence) {
|
||||
if (distance < tolerance) {
|
||||
outputValue[0] = 0.f;
|
||||
}
|
||||
/*in the falloff region, make partially transparent */
|
||||
else if (distance < falloff + tolerence) {
|
||||
distance = distance - tolerence;
|
||||
else if (distance < falloff + tolerance) {
|
||||
distance = distance - tolerance;
|
||||
alpha = distance / falloff;
|
||||
/*only change if more transparent than before */
|
||||
if (alpha < inImage[3]) {
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class DistanceMatteOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -25,8 +25,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class LuminanceMatteOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -26,8 +26,8 @@
|
||||
#include "DNA_texture_types.h"
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MapValueOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MathBaseOperation : public NodeOperation {
|
||||
protected:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixAddOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixBaseOperation : public NodeOperation {
|
||||
protected:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixBlendOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixBurnOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixColorOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixDarkenOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixDifferenceOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixDivideOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixDodgeOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixGlareOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixHueOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixLightenOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixLinearLightOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixMultiplyOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixOverlayOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixSaturationOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixScreenOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixSoftLightOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixSubtractOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MixValueOperation : public MixBaseOperation {
|
||||
public:
|
||||
|
@ -32,8 +32,8 @@ typedef enum MovieClipAttribute {
|
||||
MCA_ANGLE
|
||||
} MovieClipAttribute;
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class MovieClipAttributeOperation : public NodeOperation {
|
||||
private:
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "COM_RenderLayersImageProg.h"
|
||||
|
||||
RenderLayersColourProg::RenderLayersColourProg() : RenderLayersBaseProg(SCE_PASS_COMBINED, 4)
|
||||
RenderLayersColorProg::RenderLayersColorProg() : RenderLayersBaseProg(SCE_PASS_COMBINED, 4)
|
||||
{
|
||||
this->addOutputSocket(COM_DT_COLOR);
|
||||
}
|
||||
|
@ -20,15 +20,15 @@
|
||||
* Monique Dewanchand
|
||||
*/
|
||||
|
||||
#ifndef _COM_RenderLayersColourProg_h
|
||||
#define _COM_RenderLayersColourProg_h
|
||||
#ifndef _COM_RenderLayersColorProg_h
|
||||
#define _COM_RenderLayersColorProg_h
|
||||
|
||||
#include "COM_RenderLayersBaseProg.h"
|
||||
|
||||
/// @TODO rename to image operation
|
||||
class RenderLayersColourProg : public RenderLayersBaseProg {
|
||||
class RenderLayersColorProg : public RenderLayersBaseProg {
|
||||
public:
|
||||
RenderLayersColourProg();
|
||||
RenderLayersColorProg();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
|
||||
/**
|
||||
* this program converts an input colour to an output value.
|
||||
* it assumes we are in sRGB colour space.
|
||||
* this program converts an input color to an output value.
|
||||
* it assumes we are in sRGB color space.
|
||||
*/
|
||||
class SetAlphaOperation : public NodeOperation {
|
||||
private:
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user