Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/curves.cpp
| Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| primitive = CURVE_LINE_SEGMENTS; | primitive = CURVE_LINE_SEGMENTS; | ||||
| curve_shape = CURVE_THICK; | curve_shape = CURVE_THICK; | ||||
| line_method = CURVE_CORRECTED; | line_method = CURVE_CORRECTED; | ||||
| triangle_method = CURVE_CAMERA_TRIANGLES; | triangle_method = CURVE_CAMERA_TRIANGLES; | ||||
| resolution = 3; | resolution = 3; | ||||
| subdivisions = 3; | subdivisions = 3; | ||||
| minimum_width = 0.0f; | |||||
| maximum_width = 0.0f; | |||||
| use_curves = true; | use_curves = true; | ||||
| use_encasing = true; | use_encasing = true; | ||||
| use_backfacing = false; | use_backfacing = false; | ||||
| use_tangent_normal_geometry = false; | use_tangent_normal_geometry = false; | ||||
| need_update = true; | need_update = true; | ||||
| need_mesh_update = false; | need_mesh_update = false; | ||||
| } | } | ||||
| Show All 31 Lines | if(use_curves) { | ||||
| if(use_tangent_normal_geometry) | if(use_tangent_normal_geometry) | ||||
| kcurve->curveflags |= CURVE_KN_TRUETANGENTGNORMAL; | kcurve->curveflags |= CURVE_KN_TRUETANGENTGNORMAL; | ||||
| if(use_backfacing) | if(use_backfacing) | ||||
| kcurve->curveflags |= CURVE_KN_BACKFACING; | kcurve->curveflags |= CURVE_KN_BACKFACING; | ||||
| if(use_encasing) | if(use_encasing) | ||||
| kcurve->curveflags |= CURVE_KN_ENCLOSEFILTER; | kcurve->curveflags |= CURVE_KN_ENCLOSEFILTER; | ||||
| kcurve->minimum_width = minimum_width; | |||||
| kcurve->maximum_width = maximum_width; | |||||
| kcurve->subdivisions = subdivisions; | kcurve->subdivisions = subdivisions; | ||||
| } | } | ||||
| if(progress.get_cancel()) return; | if(progress.get_cancel()) return; | ||||
| need_update = false; | need_update = false; | ||||
| } | } | ||||
| void CurveSystemManager::device_free(Device * /*device*/, | void CurveSystemManager::device_free(Device * /*device*/, | ||||
| DeviceScene * /*dscene*/) | DeviceScene * /*dscene*/) | ||||
| { | { | ||||
| } | } | ||||
| bool CurveSystemManager::modified(const CurveSystemManager& CurveSystemManager) | bool CurveSystemManager::modified(const CurveSystemManager& CurveSystemManager) | ||||
| { | { | ||||
| return !(curve_shape == CurveSystemManager.curve_shape && | return !(curve_shape == CurveSystemManager.curve_shape && | ||||
| line_method == CurveSystemManager.line_method && | line_method == CurveSystemManager.line_method && | ||||
| primitive == CurveSystemManager.primitive && | primitive == CurveSystemManager.primitive && | ||||
| use_encasing == CurveSystemManager.use_encasing && | use_encasing == CurveSystemManager.use_encasing && | ||||
| use_tangent_normal_geometry == CurveSystemManager.use_tangent_normal_geometry && | use_tangent_normal_geometry == CurveSystemManager.use_tangent_normal_geometry && | ||||
| minimum_width == CurveSystemManager.minimum_width && | |||||
| maximum_width == CurveSystemManager.maximum_width && | |||||
| use_backfacing == CurveSystemManager.use_backfacing && | use_backfacing == CurveSystemManager.use_backfacing && | ||||
| triangle_method == CurveSystemManager.triangle_method && | triangle_method == CurveSystemManager.triangle_method && | ||||
| resolution == CurveSystemManager.resolution && | resolution == CurveSystemManager.resolution && | ||||
| use_curves == CurveSystemManager.use_curves && | use_curves == CurveSystemManager.use_curves && | ||||
| subdivisions == CurveSystemManager.subdivisions); | subdivisions == CurveSystemManager.subdivisions); | ||||
| } | } | ||||
| bool CurveSystemManager::modified_mesh(const CurveSystemManager& CurveSystemManager) | bool CurveSystemManager::modified_mesh(const CurveSystemManager& CurveSystemManager) | ||||
| Show All 18 Lines | |||||