synxis / spark Goto Github PK
View Code? Open in Web Editor NEWSPARK Particle Engine, a portable lightweight C++ library for particle effects
SPARK Particle Engine, a portable lightweight C++ library for particle effects
void SpawnParticlesAction::setNb(unsigned int min,unsigned int max)
{
if (min <= max)
{
this->minNb = minNb;
this->maxNb = maxNb;
}
else
{
SPK_LOG_WARNING("SpawnParticlesAction::setNb(unsigned int,unsigned int) - min is higher than max - Values are swapped");
this->minNb = maxNb;
this->maxNb = minNb;
}
}
Seems like it should be
void SpawnParticlesAction::setNb(unsigned int min,unsigned int max)
{
if (min <= max)
{
this->minNb = min;
this->maxNb = max;
}
else
{
SPK_LOG_WARNING("SpawnParticlesAction::setNb(unsigned int,unsigned int) - min is higher than max - Values are swapped");
this->minNb = max;
this->maxNb = min;
}
}
Hi.
Would you consider adding a license for this repo?
Library is making an assumtions that sizeof(size_t) == sizeof(unsigned int) (i.e. SPK_Group::373) which isn't true on x64 (sizeof(size_t) == 8)
Fixed by adding
TYPE_SIZE_T,
into SPK_Types::61
and
spk_basetype( size_t, TYPE_SIZE_T, meta::PassByValue );
into SPK_Types::308
But its still won't build because of some kind of error in SPK::meta::Counter
(its using sizeof inside contrution of type system so Im almost sure this is the root of the problem). Anybody came with the soultion?
Error sample:
spk_attribute(bool, loop, enableLooping, isLoopingEnabled);
(SPK_GraphInterpolator::244)
error: redefinition of 'spkAttr<((sizeof (_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1), b>'
struct spkAttr<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1), b>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SPK_GraphInterpolator.h:422:20: note: previous definition is here
struct spkAttr<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1), b>
^
SPK_GraphInterpolator.h:464:119: error: class member cannot be redeclared
static SPK::meta::Count<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1) + 2> _spk_count_Attr (SPK::meta::Counter<((
^
SPK_GraphInterpolator.h:427:119: note: previous declaration is here
static SPK::meta::Count<((sizeof(_spk_count_Attr(SPK::meta::Counter<64 + 1>())) / sizeof(bool)) - 1) + 2> _spk_count_Attr (SPK::meta::Counter<((
the error is the same as :
"build spark engine failed
#1 by qiaoqi was closed on 11 Jun 2018"
please help me, thanks a lot!
Getting the following error after failure of compilation, how to fix it? Appreciation for your reply!
SPK_GraphInterpolator.h:246:5: fatal error: use of undeclared identifier 'attrName'
spk_field(0, float, x, setX, getX);
F:/trunk/MiniStar/Src/MiniStar/Include/MiniStar/Core/SPK_DescriptionDefines.h:363:10: note: expanded from macro 'spk_field'
name,
^
SPK_DescriptionDefines.h:317:3: note: expanded from macro '_spk_structured_attr_body'
VA_ARGS
^
SPK_DescriptionDefines.h:153:4: note: expanded from macro '_spk_description_body'
VA_ARGS
^
Need update rain demo
VS2015 build spark engine failed !!!
error C2440: 'specialization': cannot convert from 'overloaded-function' to 'unsigned int (__cdecl SPK::Group::* )(void) const'
1> d:\engines\spark-spark2\include\Core/SPK_Group.h(392): note: None of the functions with this name in scope match the target type
1>d:\engines\spark-spark2\include\Core/SPK_Group.h(392): error C2440: 'specialization': cannot convert from 'overloaded-function' to 'void (__cdecl SPK::Group::* )(unsigned int)'
so how to fixed it , please tell me ,thx~
Hi,
As the definition of setZone suggests:
/**
* @brief Sets the Zone of this Modifier
*
* If the Zone is NULL, the Zone is considered to be the entire universe.
*
* @param zone : the Zone of this Modifier
* @param full : true to consider the Zone as a full object so that particles are not allowed to be within
*/
void setZone(Zone* zone,bool full = false);
when I am trying to set full to true for a point mass, still I see particles entering the zone and not getting deflected from the surface as I was expecting.
Fyi: I changed the obstacles to point mass in the collision demo to see this effect.
Could you please explain its correct use or if it is really an issue?
Here I moved only boxes to show the exact position of the particles:
Thanks!
Vivek
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.