summaryrefslogtreecommitdiff
path: root/modules/csg
diff options
context:
space:
mode:
Diffstat (limited to 'modules/csg')
-rw-r--r--modules/csg/csg.cpp36
-rw-r--r--modules/csg/csg.h6
-rw-r--r--modules/csg/csg_gizmos.cpp10
-rw-r--r--modules/csg/csg_gizmos.h5
-rw-r--r--modules/csg/csg_shape.cpp64
-rw-r--r--modules/csg/csg_shape.h14
-rw-r--r--modules/csg/doc_classes/CSGBox.xml4
-rw-r--r--modules/csg/doc_classes/CSGCombiner.xml4
-rw-r--r--modules/csg/doc_classes/CSGCylinder.xml8
-rw-r--r--modules/csg/doc_classes/CSGMesh.xml6
-rw-r--r--modules/csg/doc_classes/CSGPolygon.xml10
-rw-r--r--modules/csg/doc_classes/CSGPrimitive.xml4
-rw-r--r--modules/csg/doc_classes/CSGShape.xml12
-rw-r--r--modules/csg/doc_classes/CSGSphere.xml6
-rw-r--r--modules/csg/doc_classes/CSGTorus.xml6
-rw-r--r--modules/csg/register_types.cpp4
-rw-r--r--modules/csg/register_types.h4
17 files changed, 126 insertions, 77 deletions
diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp
index 88f3c0338a..3a61afa023 100644
--- a/modules/csg/csg.cpp
+++ b/modules/csg/csg.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -32,7 +32,7 @@
#include "core/math/face3.h"
#include "core/math/geometry.h"
#include "core/os/os.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
#include "thirdparty/misc/triangulator.h"
void CSGBrush::clear() {
@@ -242,7 +242,7 @@ void CSGBrushOperation::BuildPoly::_clip_segment(const CSGBrush *p_brush, int p_
//check if edge and poly share a vertex, of so, assign it to segment_idx
for (int i = 0; i < points.size(); i++) {
for (int j = 0; j < 2; j++) {
- if (segment[j].distance_to(points[i].point) < CMP_EPSILON) {
+ if (Math::is_zero_approx(segment[j].distance_to(points[i].point))) {
segment_idx[j] = i;
inserted_points.push_back(i);
break;
@@ -310,7 +310,7 @@ void CSGBrushOperation::BuildPoly::_clip_segment(const CSGBrush *p_brush, int p_
Vector2 edgeseg[2] = { points[edges[i].points[0]].point, points[edges[i].points[1]].point };
Vector2 closest = Geometry::get_closest_point_to_segment_2d(segment[j], edgeseg);
- if (closest.distance_to(segment[j]) < CMP_EPSILON) {
+ if (Math::is_zero_approx(closest.distance_to(segment[j]))) {
//point rest of this edge
res = closest;
found = true;
@@ -439,7 +439,7 @@ void CSGBrushOperation::BuildPoly::clip(const CSGBrush *p_brush, int p_face, Mes
//transform A points to 2D
- if (segment[0].distance_to(segment[1]) < CMP_EPSILON)
+ if (Math::is_zero_approx(segment[0].distance_to(segment[1])))
return; //too small
_clip_segment(p_brush, p_face, segment, mesh_merge, p_for_B);
@@ -461,10 +461,10 @@ void CSGBrushOperation::_collision_callback(const CSGBrush *A, int p_face_a, Map
{
//check if either is a degenerate
- if (va[0].distance_to(va[1]) < CMP_EPSILON || va[0].distance_to(va[2]) < CMP_EPSILON || va[1].distance_to(va[2]) < CMP_EPSILON)
+ if (Math::is_zero_approx(va[0].distance_to(va[1])) || Math::is_zero_approx(va[0].distance_to(va[2])) || Math::is_zero_approx(va[1].distance_to(va[2])))
return;
- if (vb[0].distance_to(vb[1]) < CMP_EPSILON || vb[0].distance_to(vb[2]) < CMP_EPSILON || vb[1].distance_to(vb[2]) < CMP_EPSILON)
+ if (Math::is_zero_approx(vb[0].distance_to(vb[1])) || Math::is_zero_approx(vb[0].distance_to(vb[2])) || Math::is_zero_approx(vb[1].distance_to(vb[2])))
return;
}
@@ -611,7 +611,7 @@ void CSGBrushOperation::_add_poly_points(const BuildPoly &p_poly, int p_edge, in
{
EdgeSort es;
- es.angle = 0; //wont be checked here
+ es.angle = 0; //won't be checked here
es.edge = p_edge;
es.prev_point = p_from_point;
es.edge_point = p_to_point;
@@ -666,14 +666,14 @@ void CSGBrushOperation::_add_poly_points(const BuildPoly &p_poly, int p_edge, in
if (opposite_point == prev_point)
continue; //not going back
- EdgeSort e;
+ EdgeSort e2;
Vector2 local_vec = t2d.xform(p_poly.points[opposite_point].point);
- e.angle = -local_vec.angle(); //negate so we can sort by minimum angle
- e.edge = edge;
- e.edge_point = opposite_point;
- e.prev_point = to_point;
+ e2.angle = -local_vec.angle(); //negate so we can sort by minimum angle
+ e2.edge = edge;
+ e2.edge_point = opposite_point;
+ e2.prev_point = to_point;
- next_edges.push_back(e);
+ next_edges.push_back(e2);
}
//finally, sort by minimum angle
@@ -953,13 +953,15 @@ void CSGBrushOperation::_merge_poly(MeshMerge &mesh, int p_face_idx, const Build
//duplicate point
int insert_at = with_outline_vertex;
- polys.write[i].points.insert(insert_at, polys[i].points[insert_at]);
+ int point = polys[i].points[insert_at];
+ polys.write[i].points.insert(insert_at, point);
insert_at++;
//insert all others, outline should be backwards (must check)
int holesize = polys[i].holes[j].size();
for (int k = 0; k <= holesize; k++) {
int idx = (from_hole_vertex + k) % holesize;
- polys.write[i].points.insert(insert_at, polys[i].holes[j][idx]);
+ int point2 = polys[i].holes[j][idx];
+ polys.write[i].points.insert(insert_at, point2);
insert_at++;
}
diff --git a/modules/csg/csg.h b/modules/csg/csg.h
index 5d6432eca8..4fa1a945cc 100644
--- a/modules/csg/csg.h
+++ b/modules/csg/csg.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -31,7 +31,6 @@
#ifndef CSG_H
#define CSG_H
-#include "core/dvector.h"
#include "core/map.h"
#include "core/math/aabb.h"
#include "core/math/plane.h"
@@ -39,6 +38,7 @@
#include "core/math/transform.h"
#include "core/math/vector3.h"
#include "core/oa_hash_map.h"
+#include "core/pool_vector.h"
#include "scene/resources/material.h"
struct CSGBrush {
diff --git a/modules/csg/csg_gizmos.cpp b/modules/csg/csg_gizmos.cpp
index 5864d02615..d4069b901f 100644
--- a/modules/csg/csg_gizmos.cpp
+++ b/modules/csg/csg_gizmos.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -283,6 +283,10 @@ String CSGShapeSpatialGizmoPlugin::get_name() const {
return "CSGShapes";
}
+int CSGShapeSpatialGizmoPlugin::get_priority() const {
+ return -1;
+}
+
bool CSGShapeSpatialGizmoPlugin::is_selectable_when_hidden() const {
return true;
}
@@ -356,5 +360,5 @@ void CSGShapeSpatialGizmoPlugin::redraw(EditorSpatialGizmo *p_gizmo) {
EditorPluginCSG::EditorPluginCSG(EditorNode *p_editor) {
Ref<CSGShapeSpatialGizmoPlugin> gizmo_plugin = Ref<CSGShapeSpatialGizmoPlugin>(memnew(CSGShapeSpatialGizmoPlugin));
- SpatialEditor::get_singleton()->register_gizmo_plugin(gizmo_plugin);
+ SpatialEditor::get_singleton()->add_gizmo_plugin(gizmo_plugin);
}
diff --git a/modules/csg/csg_gizmos.h b/modules/csg/csg_gizmos.h
index d65d1f58c1..0915d05111 100644
--- a/modules/csg/csg_gizmos.h
+++ b/modules/csg/csg_gizmos.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -42,6 +42,7 @@ class CSGShapeSpatialGizmoPlugin : public EditorSpatialGizmoPlugin {
public:
bool has_gizmo(Spatial *p_spatial);
String get_name() const;
+ int get_priority() const;
bool is_selectable_when_hidden() const;
void redraw(EditorSpatialGizmo *p_gizmo);
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index 80fa2454ec..1d27b9b6f4 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -531,6 +531,13 @@ void CSGShape::_notification(int p_what) {
}
}
+ if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
+
+ if (parent) {
+ parent->_make_dirty();
+ }
+ }
+
if (p_what == NOTIFICATION_EXIT_TREE) {
if (parent)
@@ -575,6 +582,18 @@ void CSGShape::_validate_property(PropertyInfo &property) const {
}
}
+Array CSGShape::get_meshes() const {
+
+ if (root_mesh.is_valid()) {
+ Array arr;
+ arr.resize(2);
+ arr[0] = Transform();
+ arr[1] = root_mesh;
+ return arr;
+ }
+
+ return Array();
+}
void CSGShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update_shape"), &CSGShape::_update_shape);
@@ -604,6 +623,8 @@ void CSGShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_calculate_tangents", "enabled"), &CSGShape::set_calculate_tangents);
ClassDB::bind_method(D_METHOD("is_calculating_tangents"), &CSGShape::is_calculating_tangents);
+ ClassDB::bind_method(D_METHOD("get_meshes"), &CSGShape::get_meshes);
+
ADD_PROPERTY(PropertyInfo(Variant::INT, "operation", PROPERTY_HINT_ENUM, "Union,Intersection,Subtraction"), "set_operation", "get_operation");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "snap", PROPERTY_HINT_RANGE, "0.0001,1,0.001"), "set_snap", "get_snap");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "calculate_tangents"), "set_calculate_tangents", "is_calculating_tangents");
@@ -703,6 +724,7 @@ CSGBrush *CSGMesh::_build_brush() {
PoolVector<bool> smooth;
PoolVector<Ref<Material> > materials;
PoolVector<Vector2> uvs;
+ Ref<Material> material = get_material();
for (int i = 0; i < mesh->get_surface_count(); i++) {
@@ -739,7 +761,12 @@ CSGBrush *CSGMesh::_build_brush() {
uvr_used = true;
}
- Ref<Material> mat = mesh->surface_get_material(i);
+ Ref<Material> mat;
+ if (material.is_valid()) {
+ mat = material;
+ } else {
+ mat = mesh->surface_get_material(i);
+ }
PoolVector<int> aindices = arrays[Mesh::ARRAY_INDEX];
if (aindices.size()) {
@@ -785,8 +812,8 @@ CSGBrush *CSGMesh::_build_brush() {
uvw[as + j + 1] = uv[1];
uvw[as + j + 2] = uv[2];
- sw[j / 3] = !flat;
- mw[j / 3] = mat;
+ sw[(as + j) / 3] = !flat;
+ mw[(as + j) / 3] = mat;
}
} else {
int as = vertices.size();
@@ -828,8 +855,8 @@ CSGBrush *CSGMesh::_build_brush() {
uvw[as + j + 1] = uv[1];
uvw[as + j + 2] = uv[2];
- sw[j / 3] = !flat;
- mw[j / 3] = mat;
+ sw[(as + j) / 3] = !flat;
+ mw[(as + j) / 3] = mat;
}
}
}
@@ -845,6 +872,18 @@ void CSGMesh::_mesh_changed() {
update_gizmo();
}
+void CSGMesh::set_material(const Ref<Material> &p_material) {
+ if (material == p_material)
+ return;
+ material = p_material;
+ _make_dirty();
+}
+
+Ref<Material> CSGMesh::get_material() const {
+
+ return material;
+}
+
void CSGMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_mesh", "mesh"), &CSGMesh::set_mesh);
@@ -852,7 +891,11 @@ void CSGMesh::_bind_methods() {
ClassDB::bind_method(D_METHOD("_mesh_changed"), &CSGMesh::_mesh_changed);
+ ClassDB::bind_method(D_METHOD("set_material", "material"), &CSGMesh::set_material);
+ ClassDB::bind_method(D_METHOD("get_material"), &CSGMesh::get_material);
+
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "mesh", PROPERTY_HINT_RESOURCE_TYPE, "Mesh"), "set_mesh", "get_mesh");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material", PROPERTY_HINT_RESOURCE_TYPE, "SpatialMaterial,ShaderMaterial"), "set_material", "get_material");
}
void CSGMesh::set_mesh(const Ref<Mesh> &p_mesh) {
@@ -1132,9 +1175,9 @@ CSGBrush *CSGBox::_build_brush() {
for (int k = 0; k < 3; k++) {
if (i < 3)
- face_points[j][(i + k) % 3] = v[k] * (i >= 3 ? -1 : 1);
+ face_points[j][(i + k) % 3] = v[k];
else
- face_points[3 - j][(i + k) % 3] = v[k] * (i >= 3 ? -1 : 1);
+ face_points[3 - j][(i + k) % 3] = -v[k];
}
}
@@ -2039,6 +2082,9 @@ CSGBrush *CSGPolygon::_build_brush() {
for (int i = 0; i <= splits; i++) {
float ofs = i * path_interval;
+ if (ofs > bl) {
+ ofs = bl;
+ }
if (i == splits && path_joined) {
ofs = 0.0;
}
diff --git a/modules/csg/csg_shape.h b/modules/csg/csg_shape.h
index 28d94bc2f2..a5b2238e6b 100644
--- a/modules/csg/csg_shape.h
+++ b/modules/csg/csg_shape.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -38,8 +38,8 @@
#include "scene/resources/concave_polygon_shape.h"
#include "thirdparty/misc/mikktspace.h"
-class CSGShape : public VisualInstance {
- GDCLASS(CSGShape, VisualInstance);
+class CSGShape : public GeometryInstance {
+ GDCLASS(CSGShape, GeometryInstance);
public:
enum Operation {
@@ -116,6 +116,8 @@ protected:
virtual void _validate_property(PropertyInfo &property) const;
+ Array get_meshes() const;
+
public:
void set_operation(Operation p_operation);
Operation get_operation() const;
@@ -185,6 +187,7 @@ class CSGMesh : public CSGPrimitive {
virtual CSGBrush *_build_brush();
Ref<Mesh> mesh;
+ Ref<Material> material;
void _mesh_changed();
@@ -194,6 +197,9 @@ protected:
public:
void set_mesh(const Ref<Mesh> &p_mesh);
Ref<Mesh> get_mesh();
+
+ void set_material(const Ref<Material> &p_material);
+ Ref<Material> get_material() const;
};
class CSGSphere : public CSGPrimitive {
diff --git a/modules/csg/doc_classes/CSGBox.xml b/modules/csg/doc_classes/CSGBox.xml
index 5ec7b5089d..e508468415 100644
--- a/modules/csg/doc_classes/CSGBox.xml
+++ b/modules/csg/doc_classes/CSGBox.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGBox" inherits="CSGPrimitive" category="Core" version="3.1">
+<class name="CSGBox" inherits="CSGPrimitive" category="Core" version="3.2">
<brief_description>
A CSG Box shape.
</brief_description>
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <demos>
- </demos>
<methods>
</methods>
<members>
diff --git a/modules/csg/doc_classes/CSGCombiner.xml b/modules/csg/doc_classes/CSGCombiner.xml
index 69c5df5840..51428b25f8 100644
--- a/modules/csg/doc_classes/CSGCombiner.xml
+++ b/modules/csg/doc_classes/CSGCombiner.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGCombiner" inherits="CSGShape" category="Core" version="3.1">
+<class name="CSGCombiner" inherits="CSGShape" category="Core" version="3.2">
<brief_description>
A CSG node that allows you to combine other CSG modifiers.
</brief_description>
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <demos>
- </demos>
<methods>
</methods>
<constants>
diff --git a/modules/csg/doc_classes/CSGCylinder.xml b/modules/csg/doc_classes/CSGCylinder.xml
index 92b170ed1f..24c3f8ba2e 100644
--- a/modules/csg/doc_classes/CSGCylinder.xml
+++ b/modules/csg/doc_classes/CSGCylinder.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGCylinder" inherits="CSGPrimitive" category="Core" version="3.1">
+<class name="CSGCylinder" inherits="CSGPrimitive" category="Core" version="3.2">
<brief_description>
A CSG Cylinder shape.
</brief_description>
@@ -8,13 +8,11 @@
</description>
<tutorials>
</tutorials>
- <demos>
- </demos>
<methods>
</methods>
<members>
<member name="cone" type="bool" setter="set_cone" getter="is_cone">
- If true a cone is created, the [member radius] will only apply to one side.
+ If [code]true[/code] a cone is created, the [member radius] will only apply to one side.
</member>
<member name="height" type="float" setter="set_height" getter="get_height">
The height of the cylinder.
@@ -29,7 +27,7 @@
The number of sides of the cylinder, the higher this number the more detail there will be in the cylinder.
</member>
<member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces">
- If true the normals of the cylinder are set to give a smooth effect making the cylinder seem rounded. When false the cylinder will have a flat shaded look.
+ If [code]true[/code] the normals of the cylinder are set to give a smooth effect making the cylinder seem rounded. If [code]false[/code] the cylinder will have a flat shaded look.
</member>
</members>
<constants>
diff --git a/modules/csg/doc_classes/CSGMesh.xml b/modules/csg/doc_classes/CSGMesh.xml
index 58e2bc1c4b..afe0bc262d 100644
--- a/modules/csg/doc_classes/CSGMesh.xml
+++ b/modules/csg/doc_classes/CSGMesh.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGMesh" inherits="CSGPrimitive" category="Core" version="3.1">
+<class name="CSGMesh" inherits="CSGPrimitive" category="Core" version="3.2">
<brief_description>
A CSG Mesh shape that uses a mesh resource.
</brief_description>
@@ -8,11 +8,11 @@
</description>
<tutorials>
</tutorials>
- <demos>
- </demos>
<methods>
</methods>
<members>
+ <member name="material" type="Material" setter="set_material" getter="get_material">
+ </member>
<member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh">
The mesh resource to use as a CSG shape.
</member>
diff --git a/modules/csg/doc_classes/CSGPolygon.xml b/modules/csg/doc_classes/CSGPolygon.xml
index a33e5557cb..2c5d298222 100644
--- a/modules/csg/doc_classes/CSGPolygon.xml
+++ b/modules/csg/doc_classes/CSGPolygon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGPolygon" inherits="CSGPrimitive" category="Core" version="3.1">
+<class name="CSGPolygon" inherits="CSGPrimitive" category="Core" version="3.2">
<brief_description>
Extrudes a 2D polygon shape to create a 3D mesh.
</brief_description>
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <demos>
- </demos>
<methods>
</methods>
<members>
@@ -23,16 +21,16 @@
Extrusion mode.
</member>
<member name="path_continuous_u" type="bool" setter="set_path_continuous_u" getter="is_path_continuous_u">
- If true the u component of our uv will continuously increase in unison with the distance traveled along our path when [member mode] is [constant MODE_PATH].
+ If [code]true[/code] the u component of our uv will continuously increase in unison with the distance traveled along our path when [member mode] is [constant MODE_PATH].
</member>
<member name="path_interval" type="float" setter="set_path_interval" getter="get_path_interval">
Interval at which a new extrusion slice is added along the path when [member mode] is [constant MODE_PATH].
</member>
<member name="path_joined" type="bool" setter="set_path_joined" getter="is_path_joined">
- If true the start and end of our path are joined together ensuring there is no seam when [member mode] is [constant MODE_PATH].
+ If [code]true[/code] the start and end of our path are joined together ensuring there is no seam when [member mode] is [constant MODE_PATH].
</member>
<member name="path_local" type="bool" setter="set_path_local" getter="is_path_local">
- If false we extrude centered on our path, if true we extrude in relation to the position of our CSGPolygon when [member mode] is [constant MODE_PATH].
+ If [code]false[/code] we extrude centered on our path, if [code]true[/code] we extrude in relation to the position of our CSGPolygon when [member mode] is [constant MODE_PATH].
</member>
<member name="path_node" type="NodePath" setter="set_path_node" getter="get_path_node">
The [Shape] object containing the path along which we extrude when [member mode] is [constant MODE_PATH].
diff --git a/modules/csg/doc_classes/CSGPrimitive.xml b/modules/csg/doc_classes/CSGPrimitive.xml
index 2591bab7e3..869e4006fe 100644
--- a/modules/csg/doc_classes/CSGPrimitive.xml
+++ b/modules/csg/doc_classes/CSGPrimitive.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGPrimitive" inherits="CSGShape" category="Core" version="3.1">
+<class name="CSGPrimitive" inherits="CSGShape" category="Core" version="3.2">
<brief_description>
Base class for CSG primitives.
</brief_description>
@@ -7,8 +7,6 @@
</description>
<tutorials>
</tutorials>
- <demos>
- </demos>
<methods>
</methods>
<members>
diff --git a/modules/csg/doc_classes/CSGShape.xml b/modules/csg/doc_classes/CSGShape.xml
index 56087cbb82..7fa7c78534 100644
--- a/modules/csg/doc_classes/CSGShape.xml
+++ b/modules/csg/doc_classes/CSGShape.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGShape" inherits="VisualInstance" category="Core" version="3.1">
+<class name="CSGShape" inherits="GeometryInstance" category="Core" version="3.2">
<brief_description>
The CSG base class.
</brief_description>
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <demos>
- </demos>
<methods>
<method name="get_collision_layer_bit" qualifiers="const">
<return type="bool">
@@ -29,11 +27,17 @@
Returns an individual bit on the collision mask.
</description>
</method>
+ <method name="get_meshes" qualifiers="const">
+ <return type="Array">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="is_root_shape" qualifiers="const">
<return type="bool">
</return>
<description>
- Returns true if this is a root shape and is thus the object that is rendered.
+ Returns [code]true[/code] if this is a root shape and is thus the object that is rendered.
</description>
</method>
<method name="set_collision_layer_bit">
diff --git a/modules/csg/doc_classes/CSGSphere.xml b/modules/csg/doc_classes/CSGSphere.xml
index a0069879cb..2a12cf84db 100644
--- a/modules/csg/doc_classes/CSGSphere.xml
+++ b/modules/csg/doc_classes/CSGSphere.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGSphere" inherits="CSGPrimitive" category="Core" version="3.1">
+<class name="CSGSphere" inherits="CSGPrimitive" category="Core" version="3.2">
<brief_description>
A CSG Sphere shape.
</brief_description>
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <demos>
- </demos>
<methods>
</methods>
<members>
@@ -26,7 +24,7 @@
Number of horizontal slices for the sphere.
</member>
<member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces">
- If true the normals of the sphere are set to give a smooth effect making the sphere seem rounded. When false the sphere will have a flat shaded look.
+ If [code]true[/code] the normals of the sphere are set to give a smooth effect making the sphere seem rounded. If [code]false[/code] the sphere will have a flat shaded look.
</member>
</members>
<constants>
diff --git a/modules/csg/doc_classes/CSGTorus.xml b/modules/csg/doc_classes/CSGTorus.xml
index 187d71a2fa..0d4437d87f 100644
--- a/modules/csg/doc_classes/CSGTorus.xml
+++ b/modules/csg/doc_classes/CSGTorus.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CSGTorus" inherits="CSGPrimitive" category="Core" version="3.1">
+<class name="CSGTorus" inherits="CSGPrimitive" category="Core" version="3.2">
<brief_description>
A CSG Torus shape.
</brief_description>
@@ -8,8 +8,6 @@
</description>
<tutorials>
</tutorials>
- <demos>
- </demos>
<methods>
</methods>
<members>
@@ -29,7 +27,7 @@
The number of slices the torus is constructed of.
</member>
<member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces">
- If true the normals of the torus are set to give a smooth effect making the torus seem rounded. When false the torus will have a flat shaded look.
+ If [code]true[/code] the normals of the torus are set to give a smooth effect making the torus seem rounded. If [code]false[/code] the torus will have a flat shaded look.
</member>
</members>
<constants>
diff --git a/modules/csg/register_types.cpp b/modules/csg/register_types.cpp
index 0dea09808a..33e29ec43e 100644
--- a/modules/csg/register_types.cpp
+++ b/modules/csg/register_types.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/modules/csg/register_types.h b/modules/csg/register_types.h
index 49490d31d3..9e112b72f0 100644
--- a/modules/csg/register_types.h
+++ b/modules/csg/register_types.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */