|
| DerivedPtr | SetMaterial (const VBHelpers::G4MaterialPtrOrString &material) |
| |
| DerivedPtr | SetColor (double r=0.5, double g=0.5, double b=0.5, double alpha=1.0) |
| |
| DerivedPtr | SetColor (const G4Colour &color) |
| |
| DerivedPtr | SetAlpha (G4double alpha) |
| |
| DerivedPtr | ForceSolid (bool x=true) |
| |
| DerivedPtr | SetVisibility (bool is_visible=true) |
| |
| DerivedPtr | AddBoolean (const VolumeBuilder &other, bool is_subtraction=false, bool is_intersection=false, const DLG4::VolumeBuilders::ThreeVecDimensioner &offset={0, 0, 0, VB::Length::mm}, G4RotationMatrix *rotation=nullptr) |
| |
| DerivedPtr | SetMaterial (const VBHelpers::G4MaterialPtrOrString &material) |
| |
| DerivedPtr | SetColor (double r=0.5, double g=0.5, double b=0.5, double alpha=1.0) |
| |
| DerivedPtr | SetColor (const G4Colour &color) |
| |
| DerivedPtr | SetAlpha (G4double alpha) |
| |
| DerivedPtr | ForceSolid (bool x=true) |
| |
| DerivedPtr | SetVisibility (bool x=true) |
| |
These all return the builder for fluent interface.
◆ AddBoolean()
Add a boolean operation.
This does NOT immediately trigger a build on a passed-in builder, just pre-sets the relationship.
- Parameters
-
| other | A VolumeBuilder, G4VSolid, or anything constructable by a BuilderView |
| is_subtraction | true for subtraction, false for union |
| is_intersection | true for intersection, false for union |
| offset | Offset applied to solid |
| rotation | Applied to solid |
- Returns
- The builder
Definition at line 279 of file VolumeBuilderBase.hpp.
280 {
281 auto offset = ProvisionUnits(new_offset);
282
283 if (other) {
284 boolean_configs_->booleans.emplace_back(
285 BooleanSolid{other, is_subtraction, is_intersection, offset, rotation});
286 } else {
287 throw std::runtime_error("Error in AddBoolean() "
288 "for builder named: \"" + builder_configs_->name + "\"\n"
289 " volume is invalid (null)");
290 }
292 }
std::shared_ptr< T > shared_from_this()
◆ ForceSolid() [1/2]
◆ ForceSolid() [2/2]
- Returns
- The builder
Definition at line 433 of file VolumeBuilderBase.hpp.
433 {
434 lv_configs_->force_solid = x;
435 ApplyAttributes_();
437 }
◆ SetAlpha() [1/2]
- Parameters
-
- Returns
- The builder
◆ SetAlpha() [2/2]
- Parameters
-
- Returns
- The builder
Definition at line 419 of file VolumeBuilderBase.hpp.
419 {
420 lv_configs_->color.SetAlpha(alpha);
421 ApplyAttributes_();
423 }
◆ SetColor() [1/4]
- Parameters
-
- Returns
- The builder
◆ SetColor() [2/4]
- Parameters
-
- Returns
- The builder
Definition at line 426 of file VolumeBuilderBase.hpp.
426 {
427 lv_configs_->color = color;
428 ApplyAttributes_();
430 }
◆ SetColor() [3/4]
template<typename U >
| DerivedPtr SetColor |
( |
double |
r = 0.5, |
|
|
double |
g = 0.5, |
|
|
double |
b = 0.5, |
|
|
double |
alpha = 1.0 |
|
) |
| |
◆ SetColor() [4/4]
template<typename U >
| VolumeBuilderBase< U >::DerivedPtr SetColor |
( |
double |
r = 0.5, |
|
|
double |
g = 0.5, |
|
|
double |
b = 0.5, |
|
|
double |
alpha = 1.0 |
|
) |
| |
- Returns
- The builder
Definition at line 412 of file VolumeBuilderBase.hpp.
412 {
413 lv_configs_->color = G4Colour(r, g, b, alpha);
414 ApplyAttributes_();
416 }
◆ SetMaterial() [1/2]
/**
- Parameters
-
| material | G4Material* or string for local or NIST material |
- Returns
- The builder
◆ SetMaterial() [2/2]
/**
- Parameters
-
| material | G4Material* OR a string name of a local or NIST material! |
- Returns
- The builder
Definition at line 406 of file VolumeBuilderBase.hpp.
406 {
407 lv_configs_->material = material;
409 }
◆ SetVisibility() [1/2]
template<typename U >
| DerivedPtr SetVisibility |
( |
bool |
is_visible = true | ) |
|
- Parameters
-
- Returns
- The builder
◆ SetVisibility() [2/2]
- Parameters
-
- Returns
- The builder
Definition at line 440 of file VolumeBuilderBase.hpp.
440 {
441 lv_configs_->is_visible = x;
442 ApplyAttributes_();
444 }